textdraw: For the Caravaggio of the console

I am sometimes surprised that I haven’t seen many text-based drawing tools in the past year and a half.

My interest in those would go back to the days of the Commodore 64 though, when character-driven graphics were a more popular way of working with colors and shapes. More popular than it is now, I guess. 😦

On the other hand, there are text-to-line graphics tools in figlet and its ilk. And there’s the omnipresent cadubi, for stamp-pad style text illustration.

Mix textdraw into that equation, and you have a suite of tools that should meet most of your requirements to become the next Caravaggio of the console.

2014-05-26-jk7h5f1-textdraw

Linux Mint inherits that from the Debian archives, but my efforts to build textdraw in Arch ran up against some compiler errors that I wasn’t prepared to resolve. If you’re willing to commit a cross-distro sin, steal the .deb package for your architecture from the Debian package search, and strip out the td binary with deb2targz. It works fine.

The nice thing about textdraw, and the point that cadubi, figlet and just about everything else seem to miss, are tools specific to lines and shapes. textdraw can implant circles, rectangles and lines into your document, as well as text in four different directions.

Even better, textdraw can also copy, move, delete and paste those shapes, by issuing the appropriate command after parking the cursor on the upper-leftmost corner of the object. That can be a little tricky to find on some shapes, but with a little practice, you can master it.

There are also options to save your masterpiece and to “print” it to an ASCII text file. Just quitting will send your magnum opus into the digital netherworld.

Like I suggested, textdraw is in Debian, but not in Arch/AUR, and the source code available from Debian couldn’t build on my machine. The home page is lost to me, and the few links I had for it are either to unrelated Windows programs, or are to software archives that don’t have a home page either. That’s a shame. Edit: John found a working link, here.

So … running down the list, we have:

  1. The caca libraries, which can convert from standard image files to colorized text renditions;
  2. figlet (and others), which can translate plain text into line-drawn letters;
  3. cadubi, which allows access to a wider range of characters and colors, applied stamp-pad style;
  4. and now textdraw, which can render lines and shapes, cut and paste them, move them, delete them, and apply some basic text effects.

What else could you need, Michelangelo? 😉

For making a worthy contribution to the console landscape, and doing so with a considerable amount of panache, textdraw gets a coveted K.Mandla gold star from me: ⭐ Enjoy! 😀

9 thoughts on “textdraw: For the Caravaggio of the console

  1. John

    The binary executable from that page doesn’t work for me (dynamically links against wrong version of libncurses) so I compiled from source. The only compiler error I got I corrected with this command:
    sed –in-place ‘s/round/Round/’ td.c

    Basically he defined his own function called round, even though there’s a function by the same name in math.h – with a different signature. May have been writing against an older version of the C standard or an incomplete implementation. Anyhow, by changing the capitalization it becomes a completely different function and the compiler is happy.

    I’m not super impressed with the program, but it’s the best one I’ve seen in this vein. The fact that it’s only 794 lines long (including blank lines and comments) makes me think someone adequately versed in such things could make something just as good if not better over the course of a weekend. For me it would take longer, and when was the last time I got a weekend free to hobby-code anyhow? Definitely sparks ideas, though.

    1. K.Mandla Post author

      It failed outright on my Arch system, but I didn’t think to copy down the error. It sounds like my error was different than yours.

      I agree it’s no killer app, but I like it for being straightforward and being one of the few “art” programs for the console that manages to work in cut-paste-move-copy functions, as well as building shapes. It could still use a lot of improvements … like color, of course, and drawing polygons, aligning shapes, a choice of “pens,” etc., etc.

      If you manage to build on to it, please let me know what you come up with.

  2. Pingback: tpp: Pulling it all together | Inconsolation

  3. Pingback: cavewall: For the Kahlo of the console | Inconsolation

  4. Pingback: aewan: For the Klimt of the console | Inconsolation

  5. Pingback: aewan: For the Klimt of the console | Linux Admins

  6. Pingback: Bonus: 2014 in review | Inconsolation

Comments are closed.