It seems the longer I write in this darned blog, the harder it gets to remember things I have talked about before … and things I haven’t.
That appears to have been the case this time, because I intended to but — if scroogle.org is to be believed — didn’t properly explain cadubi, which I happen to like as a vaguely artistic and somewhat amusing way of “painting” text for the console.
Now like everything else I mention, you shouldn’t get your hopes up. Console is console, and there’s almost nothing to be done to convert chunky block text into something resembling an actual picture. Almost.
Here’s how it works. Cadubi is basically a stamp-painting program, with a few simple hot-wirings that make it more usable. You set a pen shape, a foreground color and background color. Navigate with the arrow keys or with i-j-k-l, and when you smack the spacebar, the pen drops and stamps that location with the shape and colors you picked.
Nothing could be simpler. I could’ve sworn I wrote a program not too different from this in my junior high school programming class. Hello, Atari 800.
It’s fairly basic, but for what you can probably imagine, it’s also slightly inconvenient if you want to add a word or a sentence to an image. cadubi is one step ahead of you on that front, allowing you to switch to a typewriter-esque mode, and type normally on the image, a la a text tool box.
All very nice, but where’s the quan, you ask? Well, like a lot of cool things for the console, when they stand alone, they don’t impress much. But when combined with other console gizmos, they suddenly offer new potential.
figlet -w 132 -f big Motho ke motho ka botho
And then reading it into cadubi.
Experiment with things like …
figlet -f big `echo $HOSTNAME`
figlet -w 132 -f big `echo $HOSTNAME` \/\/ Crux Linux `uname -r` > login.txt
Set the pen colors before reading in the file, and cadubi will paint the entire image in that scheme. And once that’s written back out again, you can tack it on to your /etc/issue file, in a manner somewhat similar to this, and make your logins quite entertaining.
The fun doesn’t stop there. Remember caca? The colorized console text that can take input from mplayer and pipe it to the framebuffer? Well with it you usually get img2txt, which does much the same thing for a static image, of almost any type. Ergo. …
img2txt -W 102 -f utf8 wp-cccp-1280x1024.jpg > cccp.utf8.txt
And before you know it …
Touch that up, tie it to your login prompt and every geek within a kilometer radius will be sick to their stomachs with envy.
There’s lots of fun to be had here, provided you’re patient, artistic, open-minded and willing to learn. cadubi isn’t anything new, and I’m sure there are better ways to put it to use, but that should give you some ideas to start. 🙂