Tag Archives: edit

shpaint: For the Toulouse-Lautrec of the terminal

Part of the fun in spending two and a half years sifting through random text-based software has been the occasional joy in finding something amazingly cool. On occasion I’ve stumbled over stuff I didn’t even think was possible, and yet there it is, in plain view.


That’s Martin Bruchanov’s shpaint, which is a simple, mouse-driven ANSI art editor for terminal emulators. You can probably figure out how to use shpaint just by looking at that screenshot; click on a foreground color, a background color and a glyph, and click away until your artwork is complete.

It’s all the more impressive when you realize it’s written in bash. And to really blow your mind, Martin points out that it’s done in only 180 lines of bash. 😯

If I have 180 lines to work with, I’m lucky if I get “Hello, world” to appear on the screen. :\

shpaint isn’t perfect, but that doesn’t detract from its coolness. For one thing, it doesn’t work in a virtual console; I tried to fire up gpm and draw my rendition of the Mona Lisa (imagine a stick figure in garish colors), but apparently shpaint doesn’t work that way.

shpaint also can’t really do more than plot a glyph at a time. No line functions or paint-fill buckets. You have to do this old-school, like we used to do things back in the 80s.

Martin admits that occasionally something goes haywire between shpaint, bash and the terminal emulator, and clicking a cell will cause weird and random painting effects. That happened to me once or twice, but the fix is easy — just exit shpaint with CTRL+C, which saves your file automatically, then restart it and all is well.

shpaint sends your rendition of Whistler’s Mother to a flat file that will spill out the same image just with the cat command, meaning you can probably work this into other, more advanced editors to handle more intricate touchup. Don’t feel guilty doing that; our artist at work regularly sketches with a pencil, then scans her work into a computer and does everything else in Photoshop.

In fact, I’m no Picasso, but I daresay there are probably some parts of text-based artistry that would be well-served by relying on shpaint as an option to aewan, cavewall or duhdraw, even if it’s just for the speed of plotting points with the mouse, as opposed to cursor controls.

shpaint wins points from me just for being amazing and cool, but also for doing its job cleanly, obviously and without unnecessary bloat. I know this technically falls down on some of the points I like to see in text-based programs, but I think it deserves a star anyway: ⭐ Give it a try. πŸ˜‰

wiggle: A little room for wiggle

I have wiggle on my list for this morning, but I don’t know if I can show a very useful case for it.


I understand from the program description that wiggle is designed to patch code where patch itself can’t, because of conflicting changes or some other error.

Personally I couldn’t come up with something so intricate to show what patch couldn’t do, but wiggle could. It’s another one of those situations where I’m trying to find a broken case for a program, so I can demonstrate another program. :\

Which isn’t very easy if you’re not one of the people who immediately sees the use of wiggle anyway. I’m guessing if you read through the description of wiggle and say to yourself, “Hmm, that could be useful to me. …” then you’re already way ahead of me.

So I’ll leave it at that. I should mention that wiggle is in Debian and AUR; both wiggle and wiggle-git stopped on warnings for me, so you might want to disable warnings that are treated as errors when you build it.

Of course, the Debian version runs fine. There’s the convenience of a precompiled distro. Then again, the Debian package page links to a dead home page, so there’s the convenience of AUR, too. … πŸ˜‰

duhdraw: For the Van Gogh of the vc

duhdraw, as I understand from the home page, has been around for almost 20 years in one form or another, and has its beginnings as an offshoot of a DOS program called TheDRAW. And so if you’re familiar with accents among native English speakers, you may better understand that name. πŸ˜‰

Having a near 20-year history may make it look weak when compared to tools like aewan or cavewall, or even cadubi, but duhdraw might still have a few tricks up its sleeve.


That is not the world’s strongest screenshot, and for that I apologize. That was my passive-aggressive way of pointing out that duhdraw, regardless of your terminal dimensions, is going to confine itself to that small window.

Your canvas will actually stretch down to about 1000 lines, if the README file is to be believed, but width-wise, 80 appears to be its limit.

And the unreadable characters there in the screenshot are supposed to be “high ASCII” characters — pipe symbols and others, I believe — but were not properly rendered by my framebuffer …. or by rxvt-unicode, which was more disappointing. It may be a sign of its age, but apparently duhdraw had trouble reaching that high.

Most of duhdraw’s features are accessible through ALT keys, so the help screen, for example, is ALT+H. Erasing the canvas and starting over is ALT+E. Saving is ALT+S and loading is … well, you get the picture.

I found a copy-and-paste feature, such as was in cavewall or aewan, but it seemed quite primitive (or perhaps was incomplete) to me and hard to control. No transparent stamp effects or editable polygons, sorry.

duhdraw is not without its own interesting gimmicks though. ALT+D enters a line drawing mode, where just moving the cursor begins a continuous line you can control.

And I like the pickup commands of ALT+P and ALT+U, where you can instantly adopt the character and the color scheme of any character on the screen, and use it elsewhere. It’s quicker than running back and forth to the ALT+F keys for the color palette. And attribute mode is even easier, turning your cursor into a sopping wet paint roller, wherever you go on the screen.

And to be honest, trapping commands against the ALT keys is a good way to do business, since it frees up virtually every other key as a stamp, without losing out to shifted characters or special sequences. I like the way duhdraw does that.

It’s unfortunate that I couldn’t see all the characters duhdraw offered, because I have a feeling that duhdraw had more interesting approaches to ASCII art than just what the bigshots like aewan or cavewall could offer.

But duhdraw is not the do-all, be-all end of the line for ASCII art tools. In fact, if anything, it may be just the beginning, or as close as Linux users could get in 1996. 😎

aewan: For the Klimt of the console

I’ve seen about three or four ASCII art editors for the console now, and it’s becoming clear that each one has unique features that are very appealing, but misses out on something another one offers.

After I found cavewall, I figured any other ASCII art editor was going to fall flat. After all, cavewall had a slew of features that I hadn’t thought possible in text-art program, and didn’t expect to see again.

And along came aewan.


The ASCII Editor Without A Name actually includes layer management, much like you’d see in GIMP or That Other Graphics Program which shall go unnamed and unlinked. The one that starts with “foto” and ends with “shoppe.”

If you’re skeptical, so was I, but aewan pulls it off quite gracefully. And those layers are the key to copy and pasting, moving blocks of images, creating stamp pad effects and even transparent stamping. It’s amazing.

You can add dozens of layers to text drawings, set their visibility, name them and rearrange them. Set their dimensions and move them around until you complete your masterpiece.

aewan has hotkeys for the color palette, a menu-driven interface with key commands for some of the most important features, and can save all your work into a file that (supposedly; I didn’t try it) can be used in a pager to display animation effects.

Wow. 😯 That’s impressive for a program that saw its last update in 2005. My hat is off. Again. For that alone, an incredibly rare and immeasurably valuable K.Mandla gold star is warranted: ⭐ Well done.

But … I can see where some features from cavewall don’t appear in aewan. cavewall has adjustable stepping features for example, making line drawing and the like more convenient. aewan doesn’t have that, or if it does, I don’t recall seeing it.

aewan does have a specific line-drawing mode though, and that’s quite handy. Pressing the hyphen or pipe symbol actually draws the appropriate extended line, so you can draw in continuous bars, instead of just the text character. But vertical lines aren’t as easy with aewan as they are with cavewall.

And neither aewan nor cavewall has the polygon drawing and editing features that were in textdraw. But that’s only black-and-white, and so loses an edge to cadubi, which behaved more like a colorized stamping program that could import images rendered by caca, and edit them.

So I’m at the point now where each of these has a particular feature that makes it shine, but misses out on something mastered by its brethren. Perhaps at some point a Grand Unifying Text-Based Art Tool will appear. And it shall be known as GUTBAT, and the people shall rejoice. … πŸ™„

cavewall: For the Kahlo of the console

I had to scrounge around the Internet for a while, before I could find the home page for cavewall. It was worth it:


cavewall is another ASCII “image editor” allowing you to draw and create pictures using text symbols and so forth. We’ve seen a few of these in the past, to include classics like cadubi, or hidden gems like textdraw.

A lot of the files that are in the latest cavewall tarball date back to 2006 or even earlier. I didn’t expect it to compile, but as you can see, it worked more or less flawlessly.

For as hard as it was to find cavewall, it’s a huge step forward in ASCII drawing programs. It has, for example …

  • Block selection and range functions, which is a huge addition, because it adds things like …
    • Copy and paste functions
    • Fill functions
    • Paste from clipboard options
    • Custom box and frame creation, and more
  • Stepping modes, so pressing a character moves you in a specific direction — not just to the right
  • Menus for most program functions, plus hotkeys for the most common ones
  • Export to plain text or HTML
  • Import back from those formats

And a lot more. cavewall manages to take a lot of cadubi’s high points, and some of textdraw’s best functions, then add a few bonuses of its own, and combine them all in a very usable way.

It’s clear not everything is finished (I would have loved to see the “inject figlet-ized text” feature work), and it needs a little polishing on some points (the menus are sometimes obtrusive, or overwrite themselves, and cavewall intercepts some command sequences as text … small points). But the majority of it seems to be working.

Like I said, cavewall doesn’t appear to have seen attention in almost a decade. Very rarely do I wish for someone to adopt a program and bring it up to date (well, okay, sometimes I do), but cavewall is so very nearly perfect, that it’s sad to see it languish unnoticed in a corner of the Internet. 😦

I’m going to give cavewall a great big shiny gold K.Mandla star though, in the hopes that someone will see its potential and give it the boost it deserves: ⭐ πŸ˜‰ Enjoy!

csstidy: Tidy and neat

I like tidy tools. I like tools that take my mess of HTML and turn it into the stuff of legend. No doubt if I was a programmer I’d think a similar tool for perl was as cool as sliced bread. csstidy presses that same button, and makes me wish I had a reason to use it.


As you can see there, csstidy lopped off the start of my ugly-as-sin HTML file, and sent me back a corrected, clean and spaced version, ready for editing or to be injected back into the file. It even went so far as to make some small improvements.

csstidy has a few options, which will reveal themselves to you if you invoke csstidy without a target. (Don’t try -h or --help.) Most of them are more than I would ever need to dress up my lowly web pages, but there might be something there that enthuses you.

Short of that, there’s not a lot for me to say about csstidy. I was scolded a long time ago for not coding like a girl, and I know I shouldn’t rely on tools like this if I ever want to be a rock-and-roll-web-page-designer, but hey … it works clean and neat for me. πŸ˜€

ngp: Find it and edit it, in one deft motion

These days I seem to be finding less and less tools that really grab me, and more and more that seem to fall short of the mark somehow. ngp is one of the former, and this one I think I shall keep around.

ngp is like a recursive, colorized, interactive grep. If you take the output of ack, make it navigable with a selection bar, then add the ability to jump straight into a selected file with your $EDITOR, you’ll have an idea of what ngp does.

So for example, this

 ngp -r ion

Takes me straight to this:


And from there, if I highlight a line and press enter, I jump into $EDITOR and can adjust as necessary. Leave the editor and ngp reclaims the terminal, showing the same results but with red text, so I know I already traveled there. Very smooth. 😎

ngp strikes me as a tool someone would invent where they see themselves repeating the same task over and over, and relying on two or three terminal windows to track their progress. And if you work in text files a lot, or through trees of code, I imagine ngp would save you some time finding certain problems, and fixing them.

ngp can be a little finicky, so watch your flags carefully. And I might have compared it to grep but it’s not feature-compatible, so don’t start throwing wild strings of flags at it and expecting it to munch them down the same way grep does.

But for a find-and-replace or find-and-edit or search-and-destroy at the console tool, ngp has everything tied up in one, nice, neat package. A well-earned, albeit completely valueless, K.Mandla gold star: ⭐ Enjoy! πŸ˜‰