Version: | 0.1 |
---|---|
Copyright: | Copyright (c) 2010 J.A. Roberts Tunney |
Run the following commands:
sudo apt-get install python-imaging
sudo python setup.py install
Implements Support for the 256 colors supported by xterm as well as quantizing 24-bit RGB color to xterm color ids.
Color quantization is very very slow so when this module is loaded, it’ll attempt to automatically compile a speedup module using gcc. A logging message will be emitted if it fails and we’ll fallback on the Python code.
Tries to compile/link the C version of this module
Like it really makes a huge difference. With a little bit of luck this should just work for you.
You need:
Quantize RGB values to an xterm 256-color ID
This works by envisioning the RGB values for all 256 xterm colors as 3D euclidean space and brute-force searching for the nearest neighbor.
This is very slow. If you’re very lucky, compile_speedup() will replace this function automatically with routines in _xterm256.c.
Convert xterm Color ID to an RGB value
All 256 values are precalculated and stored in COLOR_TABLE
I implement functions to satisfy your darker side.
Cheesy Gothic Poetry Generator
Uses Python generators to yield eternal angst.
When you need to generate random verbiage to test your code or typographic design, let’s face it... Lorem Ipsum and “the quick brown fox” are old and boring!
What you need is something with flavor, the kind of thing a depressed teenager with a lot of black makeup would write.
Names your poem
I provide a command-line interface for this module