Painting with cadubi

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.

cadubi can also read in files, edit them, and output to disk again. Enter figlet, setting the width of the output and the font from the command line …

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`

or even

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. :)

About these ads

4 Responses to “Painting with cadubi”


  1. 1 Onyros 2009/11/19 at 9:00 AM

    K., this is a little OT, but as I was looking at that last screenie, I kept wondering… Where did you find that 12pt terminus font? I’ve been using different fonts, but I really like terminus, just not @ 14pt.

    Is there an Arch package? I’ve looked around and didn’t find anything.

  2. 2 kgas 2009/11/30 at 1:22 AM

    There is no PKGBUILD in arch, you can make one. A deb file is there in Ubuntu and you can convert it ot tar.gz file using deb2targz for Arch.


  1. 1 Destillat KW47-2009 | duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ... Trackback on 2009/11/20 at 6:47 PM
  2. 2 figlet and asciimo and a little irony « Motho ke motho ka botho Trackback on 2010/07/04 at 7:59 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,960,053 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: