textprint: Visually impressive, in only 18K

You can get graphing and plotting functions in the console from a variety of sources. textprint is easily my favorite for simple data arrays, mostly because it can do this, with only 18K:

2015-04-16-6m47421-textprint-01 2015-04-16-6m47421-textprint-02 2015-04-16-6m47421-textprint-03

textprint takes a flat data file as input, and arranges it graphically to fit the terminal without distorting the image. From there, textprint goes from zero-to-60, in about two seconds.

Because on top of a rather bland plotting display, you have the option to pick between about four or five different graphs, including the bar and column charts you see above, and a couple others.

And then, you can shift those displays along the x or y axes, zoom the displays and even “print” the display to a text file that matches what you see on the screen. (I did see some corruption when trying to zoom in too “close,” though.)

So you have essentially a tool to convert data arrays into visual representations, adjust them to your liking, then “print” them in their new format. And all that in only 18K.

textprint is not without shortcomings, but truth be told, I could sift through anything and find small nits to pick at. Color options would be nice, and while it does have onboard help, there aren’t any flag options that I can see. If I could send commands to textprint and have it spit out a “printed” file without the interface, textprint would be doubly useful.

And to be honest, the title “textprint” is a slight misnomer. That’s going to get lost in the endless array of pdf converters, ASCII readers and document translators that already pepper the ‘web. It needs a more accurate, and more descriptive title.

It’s still exceptionally impressive though. And the fact that it has so many options in such a small space. And seeing that it’s a dozen years old and still working is noteworthy too.

Not in Arch/AUR or Debian that I could find. textprint is bundled with a precompiled binary, but it’s going to look for an ncurses library that didn’t exist on my Arch system. The command to compile it is in the readme.txt file.

rtv: Arr tee vee

And the hits just keep on rolling.

2015-04-15-6m47421-rtv-01

I’m only a lukewarm fan of reddit; it’s useful in some cases, but rather bewildering to me at other times, and I find the blind structure a little confusing.

All the same, we’ve seen reddit-specific console tools in the past, and ordinarily I’d step over something that was specific to one forum or site. But this seems particularly well done.

2015-04-15-6m47421-rtv-02 2015-04-15-6m47421-rtv-03

rtv claims to be compatible with a lot of terminal emulators, but my preliminary tests suggested it was quite comfortable with a framebuffer terminal too, and didn’t lose out any text or characters over font limitations.

Configuration is very straightforward, with a brief rtv.cfg file you drop into .config/rtv/ and edit with your account name and password (in plain text). You can also define a default subreddit (thereby avoiding unnecessary pictures of cats) and jump from subreddit to subreddit with the slash “/” key.

Right arrows open the discussion in a nested format, which is very convenient, and the “o” key will bounce you into your XDG browser. There are also keystrokes for refreshing a page, searching a page and posting a reply. If you’re a die-hard reddit fan and need something lighter than Firefox (what isn’t lighter than Firefox?!) to get your daily fix, this might be the droid you’re looking for.

Like I said, I’m not a huge fan, but I can’t mark down rtv for working specifically with a site that I am only ambivalent about — particularly when it does everything right. Beautiful color, very flexible display, easy controls and keystrokes with a visual representation that makes following discussions easy. Piece-of-cake configuration and on-screen help displays make rtv an clean sweep.

So here goes: ⭐ Don’t spend the whole day looking at pictures of cats, now. … πŸ˜‰

P.S.: In AUR only, as both rtv and rtv-git. The -git version worked fine for me.

alot: With notmuch help involved, and little more

Up front, let’s say that alot is a “graphical” interface to notmuch, which you might know or remember as a mail indexer and search tool.

2015-04-14-6m47421-alot-01 2015-04-14-6m47421-alot-02 2015-04-14-6m47421-alot-03

And as you can see, alot has a lot πŸ˜› of the right stuff — good color, very flexible terminal space, on-screen help and an intuitive interface. Navigation is with enter keys and a few other mnemonics, and some keys have global behaviors, regardless of what you’re doing at any moment in time.

I would bet that, once your mail setup is complete, you’ll only need about three or four minutes to learn how to use alot, and after that, you’ll cruise through your mail folder at ludicrous speed.

A few things to remember though. … alot needs notmuch on board, which means you’re dealing mostly with the local mail concept, as opposed to relaying directly to an online mail source. If you’re looking for something that will pull down messages from GMail and let you pick through them, I don’t think this is it.

On the other hand, it does mean that you’re free to latch alot (and notmuch) on to your home-grown mail system — or as I showed above, latch notmuch onto something like offlineimap, which can yank messages off GMail and store them locally.

So technically speaking, there are options. The question becomes, how much do you want to step backwards through programs, just to take advantage of alot, when things like alpine can more or less handle the entire process in one fell swoop? Again, if you use a local mail system, alot might be preferable. For me … well. … 😐

All in all, I have to give alot a gold star for catching every point in my checklist for a good console application. I don’t think this is a game-changer for me though, since I’d have to rely on two or three other programs before alot became my mail reader, even if setup is fairly straightforward for all of them.

In AUR as alot and alot-git, but the git version wasn’t working at this exact moment in time. In Debian. And of course, as promised: ⭐ Enjoy! πŸ™‚

tree: Two and a half years later. …

I think I have just enough applications to round out the month, before calling it quits. Of course, as luck would have it, somehow I made it through 30 months of text-based applications without mentioning tree. So there will undoubtedly be something leftover at the end.

2015-04-13-6m47421-tree

Mentioning ddir first was probably wise though, since tree does most (if not all) of what ddir can do, and then some. I never did find an option in ddir for line-drawing characters, but tree does that by default, has options for color, can use ANSI lines and even codepage 437 graphics (which may or may not produce decent lines on your machine, without the help of cp437).

And perhaps of interest to higher programming powers than I, tree also has options to export to XML and JSON. It’s not terrifically beautiful, but I can see where that would be a great option to have available.

But that’s about all there is to say about tree. It does much the same as yesterday’s program, just with a little more panache. In Debian, in Arch, in … just about everything, I think.

Now, having mentioned tree, I can safely rewrite all those posts from all these past years about software that relies on tree, like pstree and pass and. … 😯

ddir: Echoes of tree

If you’ve taken a look at the old blog in the last day or so, you’ll know that I’m closing up shop at the end of the month.

The long and boring explanation is over there; the short and snappy one is here: It’s been a decade since I started writing out my Linux experiences there, and two and a half years of chasing down console software here — a lot more than I anticipated on either side.

Suffice to say it’s time for me to move on to new things. I’m also putting an end to the name, so if someone offers you advice in the future and calls themselves “K.Mandla,” it’s not me. πŸ˜•

For today, I have ddir to show. It’s not terribly beautiful, but I think you will see its usefulness.

2015-04-12-r8-t826t-ddir

I’ve known about ddir for a while, but to be honest, whenever I’ve needed something like ddir, I just grabbed tree (which I see now is listed nowhere on this site. 😑 ) They are very similar, as I’m sure you’ll admit.

And given that ddir seems to only offer ASCII characters as output, tree offers a small visual improvement. True, it’s the difference between 1982 and 1983 in console graphics, but it’s there.

ddir’s “help” flag will spit out its man page if you ask, and its few options are there for your perusal. Probably of most interest is the -d flag, which will prune the output (get it? prune? tree? :\ ) to directories only.

ddir is a basic tool and probably something an introductory-level CS student could replicate on a Saturday night as a party trick, but you can probably see a few uses for it. It’s in Debian as just “ddir,” but I don’t see it anywhere in Arch.

And the obvious post for tomorrow will be … tree. πŸ™„

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. πŸ™‚

boa: Run a server from anywhere

Usually I steer away from server daemons on this site; I don’t have enough experience setting them up and the configuration can be a little tricky.

boa was fairly straightforward though, even when I added the complication of yanking the Debian binary and jamming it down the craw of my Arch installation.

2015-04-10-lr-0xtbe-boa

No major accomplishment in the grand scheme of things, but I at least have a real screenshot to show off. :\

Everything I know about boa is off the Debian page or the help flags, with a little more added in the configuration file. If you point everything at the current directory when boa runs, it will serve up its own folder, much like you see above.

On the one hand, that might be preferable to some of the complexities for members of the high-end server market.

Apparently boa runs on an exceptionally small amount of resources, and can even do its business on Pentium-grade equipment. I don’t have a Pentium machine now that I can put that claim to the test, but perhaps the next one that comes along, I’ll try. (Actually I do have one now, but it’s so badly battered that I’m considering setting it free.)

That’s about all I can say about boa, but that’s mostly because I’m fairly ignorant about web servers to start with. If you’re in that racket and need something with a smaller profile, boa might be for you.

In Debian. Not in Arch. πŸ˜‰