Tag Archives: text

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.

2015-04-18-6m47421-shpaint

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. πŸ˜‰

zscroll: Pure flair

I am again doing you a disservice by showing a static screenshot of zscroll:

2015-04-11-lr-0xtbe-zscroll

The animation effect is what we’re really after with zscroll, as the letters shift from right to left and the data updates. None of that is really visible from that command or image. Use your imagination. πŸ˜‰

zscroll is fairly straightforward to use, with simple flags for options like after-text or before-text, or for padding the display with special content. You can also adjust the speed of output, clip it at a particular length, or set it to use double-width characters.

And zscroll allows just about any text to appear, provided you can wrangle it to fit and display as you want. As an example, I yanked the mocp playback status in the image you see above; it’s nothing special, but shows zscroll’s relative flexibility.

I don’t see a way to reverse the scrolling effect, which means if you want a left-to-right motion for right-to-left languages, it might not happen. And of course, if you set zscroll to display in a window that’s wider than your target text, nothing moves at all. It would be nice if zscroll could wrap the object text to fill any space.

zscroll is a no-brainer for any kind of window manager that allows for status bar displays, or even tiling window managers that will run one row deep. A little elbow grease and — ta-da! a constant stock quote update in the upper corner of your screen. Or something like that. Again, use your imagination. πŸ˜‰

zscroll is pure flair, but it’s good to add a little flair sometimes. It’s in AUR as zscroll-git, but not in Debian that I could find. πŸ™‚

atto: Pushing the limits of practicality

For a second title today, here’s atto.

2015-04-07-6m47421-atto-01 2015-04-07-6m47421-atto-02

atto is a line editor of extremely minuscule dimensions. The source code takes up only 16K, and the executable is a mere 18K. My ancient ps_mem.py script tells me that, without a loaded file, atto is running on 40K, which makes it technically smaller than e3 — and that is saying something.

Problem is, as a line editor, it can be quite a tangle to work with. I supposed if you’ve handled ex, which is vi’s line editor counterpart, atto might be easier to learn.

But for me, line editors are mostly inscrutable. atto has a help screen that shows all the available keystrokes and their corresponding actions, but I find I’m a bit lost on how to even navigate with atto. I see that pressing SPACE steps through the file line by line for me, and if I press “e” I get an editing prompt, but beyond that, I’m mostly lost.

I suppose I should be disappointed or try harder, but to be honest, atto (and line editors on the whole) are mostly curiosities to me. I have tried a few, and even some that are one step up from your normal line editor, but the entire style just doesn’t appeal to me. I cut my teeth on WordStar and the like, and line-by-line editing is just not my style.

In any case, I can see the usefulness of extremely small editors such as this, and given its gossamer profile, it has applications in wicked tight situations. But I would probably have to work my way back to the Pentium era to put myself into one of those spots.

Not in AUR. Not in Debian. The command to compile atto is on the home page. Enjoy!

color-invaders.sh: A script! and a site!

My favorite e-mails are the ones with lots of exclamation points. It’s usually a sign that someone is quite enthusiastic about the program they want to share. Or quite incensed at something I wrote. 😦

karl sent an orchard of exclamation points (happy ones, that is) on Saturday along with a note about color-invaders.sh, which apparently has its roots on the Crunchbang forums.

2015-02-26-6m47421-color-invaders.sh

And there you can see my very bland color scheme, which probably wouldn’t win any exclamation points from karl.

Aside from drawing the classic invaders in colors that you have set for your shell, color-invaders.sh doesn’t really do much. And there are lots of similar tools, that really only show what colors you set, so you can see if your desktop is something worth sharing with the wide, wide world. πŸ˜•

Part of karl’s enthusiasm though, was for a website that lets you experiment with colors and returns the codes necessary to implement them. karl didn’t say where that came from or if it was his own invention, but I don’t think it is.

I am sure there are other sites that similarly streamline the coding portion of custom shell colors; if there is a better one, feel free to mention it. And if you have a script or tool that displays shell colors in a more inventive fashion, pass it along too.

I am sure at least one person — mostly likely karl! — would be happy! to hear about them! :mrgreen:

P.S.: For what it’s worth, I don’t usually run a custom color scheme, and that’s by choice. A long time ago I was looking at the colors in a program and wondering why some things were hard to see, and realized I had inadvertently mashed two similar colors together, making the program somewhat difficult to read. I keep it plain now. Sorry, karl. πŸ˜‰

talkfilters: All that computing power, and this is what you come up with?

After falling flat with yesterday’s attempt at an amusement for the console lifestyle, I thought perhaps talkfilters might be able to give me a quick giggle.

2015-02-25-6m47421-talkfilters

Well, I smirked at one or two.

talkfilters is exactly what you think it is — a series of filters that exchange certain words or letter sequences for analogues spelled or arranged to poke fun at certain dialects or speech patterns. Or individuals.

In some cases, it’s not so much a filter as an insertion tool though, with sporadic phrases interjected at points. Sometimes it’s funny, sometimes it’s just an obfuscation. And sometimes there’s probably a joke in there, but I don’t know what it is. :\

Like any attempt at comedy, talkfilters is likely to insult you if you think you’re the target of its humor, and I see one or two in there that might even be jabs at me. Not personally of course, but probably at my own demographic.

I don’t really care though. If your sensibilities are so fragile as to take offense at a juvenile filter that translates into an “accent,” then you haven’t been exposed to the real problems that can happen in life.

Regardless, I can see where one or two of these might have an application beyond the comic, and the buccaneer filter is likely to be of use sometime in September. Aside from that, I don’t know if there’s much other than comic relief they can offer. If they even do that. … 😐

P.S.: In Arch as talkfilters, in Debian as just filters.

mined: Long overdue

I could swear that I had looked through mined a year or two ago, and found it worthy. But I got an email yesterday from martintxoz saying it wasn’t anywhere on this site, which would be a dire oversight. And now, looking through the Index I find nothing, and both DuckDuckGo and Google agree: I have been remiss.

2015-02-24-6m47421-mined-01 2015-02-24-6m47421-mined-02 2015-02-24-6m47421-mined-03

mined is a text editor that comes in a variety of flavors and versions, and one of the reasons I should have visited this long before now is that it goes to great lengths to satisfy weirdos like me.

Perhaps the most satisfying being, it has the option for commands and keystrokes that mimic WordStar, so I don’t have to suffer to learn unintuitive keystrokes. (It will also pretend to be pico, or even emacs, although I shudder at the thought.)

And it uses color, has pulldown and popup menus at every turn, syntax highlighting, on-screen cues, mouse support and a man page almost as long as mplayer‘s. 😯

2015-02-24-6m47421-mined-04

If that isn’t enough for you, I can honestly claim that I’m amazed at the length and breadth of options available to you — all the way down to whether a paragraph end is coded with a non-blank line end, or an empty line. That is considerable detail.

Supposedly, mined’s real claim to fame is support for multicode characters or alphabets beyond the stale 26 letters that comprise Western language. If you need access to those glyphs, mined might be something to look into.

Of course, that lack of character support is what causes some of the goofy images you see in the screenshots. I could do everyone a favor and install something a little more visible than just the garble you see here and there, but I’m lazy today. πŸ˜‰

mined is good stuff. It has just about every feature you could imagine, makes no excuses for pulling in the keystrokes and styles of other popular editors, uses colors and a menu approach, and even has features that will appeal to specific groups of users. It’s well arranged, well thought-out and has a clean visual appearance.

With that much going for it, this shouldn’t be a surprise: ⭐ Enjoy! πŸ˜‰

html2wikipedia: Converting back and forth

A long time ago I mentioned wikipedia2text, and not long after we ran past wikicurses as an alternative. In both of those cases, the goal was to show Wikipedia pages in the console, without so much congealed dreck. wikicurses in particular seemed like a good option.

But considering that much of Wikipedia is put together in a markdown-ish fashion, wouldn’t it make sense to have some sort of conversion between HTML and Wikipedia format? You could conceivably take a dull .html file and send it straight through, coded and set.

Never fear, true believer.

2015-02-17-6m47421-html2wikipedia

html2wikipedia is a free-ranging program that does very much that same thing. In that case, I grabbed kernel.org, pumped it through html2wikipedia, and got something very close to markdown.

I should mention that it’s not perfect; I wouldn’t blithely slap the results of html2wikipedia straight into a Wikipedia page, mostly because I think the formatting would be off kilter here or there.

But at first glance, it’s certainly in a workable state. The author suggests it should work in Windows too, so if you’re an avid Wiki-gnome (I am not), this might save you save time and work in the future.

Like I mentioned, I don’t see html2wikipedia in either Arch or Debian, but I don’t take the time to go through every distro out there. 😯 Whether it is or isn’t, this is one of those times where it might be quicker and easier to download the source code and build it manually than download all the other packaging materials that accompany a 59Kb executable. πŸ™„

presage: Oh, you think you’re sooo smart

I have always tried to be somewhat accommodating in these daily software adventures. I run into a lot of things I have no frame of reference for, and so long as it’s not utterly bewildering, I’m at least willing to run a program once.

presage is … not really an application, but it looks good, so I’m willing to give it a spin. Here’s the built-in presage_demo that comes with the Debian version.

2015-02-03-r8-0acre-presage

presage is a “predictive text” framework, and probably meant more to sit behind the shiny surface of your smartphone and guess at the word you want next while you text your significant other.

So in that sense it’s not really something I have a framework or reference for, but as you can see, it does seem to do the job.

Looking over the home page, you might be asked to make the distinction between a predictive text tool and a spellchecker, where the first is using an algorithm of some sort to suggest your next word, while the latter is correcting fat-fingered mistakes.

I have no problem accepting that difference, and I mention it since, again, presage isn’t really supposed to be used by itself, and rather as a support for something else. If you’re a developer or if you have a keen interest in how your Android works, this might be an educational opportunity for you.

As for myself, I am afraid I shall not get much farther with presage. I have a superiority complex, and can’t stand it when my computer acts like it knows what I want. It just thinks it’s sooo smart. … πŸ‘Ώ

vile: That child is an abomination!

Depending on your allegiances, this screenshot is likely to make you howl with maniacal laughter, curse the heavens, or vomit uncontrollably.

2015-01-28-6m47421-vile

Of course, if you have no allegiances (like me), then it doesn’t bother you at all.

That’s vile, which is understood to be an acronym for vi-like emacs. If you are a true believer of either of the vi/vim or emacs camps, the very notion of combining them into a hybrid application is likely to be heresy.

To be clear though, as I understand it, vile hopes to merge vi specifically with some of the emacs superstructure, so it may be that it is forgiven for trying to add on to what the ancient editor could do.

I don’t think it’s necessary to delve too deep into vile to see how it attempts to merge some of the features of both editors. Even the startup screen will cue you in, with the status line listing two or three ways — some very emacs, and some very vi — of accessing the help pages.

But that’s about all I’m going to relate about vile. I happen to belong to that third camp which says both of the prevalent editors are unworthy, and anything else is an improvement.

So the idea of merging vi and emacs strikes me as a completely pointless exercise. Neither of them is that great to start with, and their unholy offspring is not any clear winner.

“The mystery of life isn’t a problem to solve, but a reality to experience.” πŸ˜‰

unhtml: Peeling away the layers

Last week I ran across three gold-star-winner programs in a matter of days; this week I seem to have run aground on one-shot command-line tools, clients or application frameworks.

No matter. It takes all kinds. Here’s unhtml, and you can probably guess as to its goal.

2015-01-28-6m47421-unhtml

unhtml is one of probably two or three (or four or five …) html-strippers that I’ve seen since the start of this silly little site, and while it’s not the most elegant or flexible, it might be the oldest.

The man page for unhtml has a date of 1998, and if that’s its inception date, then it has done well to survive this long.

Of course, it probably has Debian to thank for that — I looked briefly for an original home page, but didn’t find anything that satisfied me. And considering that the AUR page for unhtml simply pulls the source code from Debian, it might be that it’s only around now because of the way Debian preserves code.

I can’t speak very highly of unhtml no matter its age; its only flag is a call for the version, and even the man page is exceedingly terse. You have the flexibility to pipe code through unhtml or to aim it at a file, but that’s about it.

All the same, I think it does the job, and with the exception of a few oddball tags like you see above, it did what it promised. Given the option, I might rely on something else though. Personally, that is. :\