Tag Archives: document

bropages: It’s like man, bro

I see the evolution of thought that brought about the name “bropages,” and I’ll admit that I too most often learn best just by looking at an example.

2014-10-09-6m47421-bropages-01 2014-10-09-6m47421-bropages-02

bropages is an extrapolation of man pages, focusing on practical examples and very terse explanations, rather than just wordy explanation.

And I am on board with that. I prefer man pages that include examples instead of just dry explanation because, as has been the problem even recently, words get in the way, and the problem compounds itself.

So bropages has its own niche that I can appreciate.

The actual bropages tool — which installs as bro — wins points from me for keeping things simple, but attractive: It is more or less transparent, it sends its responses to your $PAGER, and colorizes the results to make things easier to read. Those are all three big pluses for me.

And for what I have seen, bro makes it easy to contribute to the collective bro-knowledge, with bro add being the gateway to submitting your own individual genius … provided you have an account, of course.

There’s a social networking element (for lack of a better word) here too, with the option to promote or demote examples. For what I can tell, examples with high ratings appear at the top of the list, which might be an indicator of their usefulness.

Might be. I’ve already skimmed through one or two bropages and seen examples that I wouldn’t use, or would at least do differently. You could probably say that about anything, but I think the caveat to bropages is to remember that you’re relying on the collective intelligence of a vast swath of complete strangers. Buyer beware.

The AUR version of bropages worked fine for me; I don’t see bropages in Debian but I think this might be a new endeavor.

If you find bropages particularly useful, be sure to say, “Bro … thanks,” to your bros online. ๐Ÿ˜Ž

man: Man, oh man

I didn’t include man in my traversal of the M section back in January, and as rameses pointed out later in an e-mail, that was an oversight. One of the best parts of man, he said (she said?), was in this:

man --html=elinks man

which on most systems will give you this:

2014-07-23-6m47421-man-01-elinks

Ta-da, a man page with clickable links, and navigation that you’ll know and love. If you want to take that home to meet your parents, I can tell you that the Arch version dumps that file into /tmp in an individual folder, usually with a filename that resembles your original command.

Copy that to anywhere you like, and you have a permanent local man page accessible by browser. And you thought all those online manpage collections were Internet wizards, and here they are just script kiddies taking advantage of a built-in feature of man. :\

But wait, there’s more. ๐Ÿ˜ฏ

man -t man

By itself that’s only partially useful, but jam the results through our old friend ps2pdf.

ps2pdf man.ps

And … bingo:

2014-07-23-6m47421-man-02-acroread

Yeah, I know: Acrobat Reader. I did that just to annoy you. Did it work? ๐Ÿ˜ˆ

Now man is clever enough to dump to PostScript file, and of course from there, we can generate spiffy PDF versions of our favorite documentation. Print those out, and you’ll never need digital help again. Or you can study for the edX Linux course next month. ๐Ÿ˜‰

rameses also mentioned it was possible to cue up man pages from within emacs, and I had to hunt down the answer to that one. Turns out just a simple M-x man from within emacs will prompt you for a title, which in turn yields something like this:

2014-07-23-6m47421-man-03-emacs

Nifty. The only way I know of to do that in vim is man man | vim - which is a bit brutish. Giving vim :!man man doesn’t count, since that’s just dropping back to the shell, and cues most (my $PAGER) as a result. If you know of a better way, please let me know. ๐Ÿ˜‰

In any case, rameses was right: It’s worth checking out man just for its ability to generate alternative formats. I promise to pay better attention next time. ๐Ÿ˜‰

wv: From Word to whatever

I’ve seen plenty of Word-to-text converters over the past year and a half. I think wv might be the first to offer conversion to text and whatever else you might want.

2014-06-30-6m47421-wv

The list is long, but distinguished: wv comes in an array of utilities that will convert from Word format to:

  • HTML,
  • Latex,
  • “Clean” Latex,
  • DVI,
  • Postscript,
  • PDF,
  • Simple text,
  • Abiword,
  • WML,
  • RTF, and
  • MIME.

There’s also a utility to show the embedded data in a Word document. Not shabby, eh?

There’s a downside, of course. There always has to be a downside. And this time the downside is … wv’s last timestamp was in 2006. A successor project, wv2, has an impress of 2009. ๐Ÿ˜•

That’s not too promising for anyone who wants to convert out of Microsoft Commercial Office Professional Gold Pack Business Edition 2016. Or whatever they’re calling it these days.

I know that hamstrings an otherwise useful array of conversion programs, but unless you’re willing to pick up wv’s banner and bring it abreast of changes in its counterpart program, it might not ever change.

And that’s the way of all flesh when it comes to open source software: Things take hold, win a measure of popularity, wane and decline, then become dusty back-alley projects that are fodder for junk-journalism app-a-day blogs that pick over the remains of asphyxiating software and blather on endlessly about irrelevant points of usability. …

Hey … ! ๐Ÿ˜ก

pinfo: A new viewpoint is always welcome

This is subtle, so it might take a few passes before you can see what’s going on here:

2014-03-03-lv-r1fz6-pinfo

That’s pinfo, and it’s perusing its own man page. But pinfo is hard-wired to follow “links,” which I quoted because those aren’t really links like you’re used to in a browser.

So if you watch closely you can see where it jumps from pinfo to curs_getch, then wresize, then resizeterm, and so forth. Almost like a browser, but through man pages.

I really like this. More than once I’ve wanted to jump through man pages like web pages, and this can do it from the console, and with color, and offline if necessary.

pinfo doesn’t just peruse man pages though, it can handle info files and has a few other options to investigate. Both Arch and Debian have pinfo in their repos.

I’m going to try to use this as my $PAGER and see if it creates any havoc. I expect to have it jump into view whenever a program calls for a help page, but that’s just my expectations.

More news later. ๐Ÿ˜‰

catdoc: Another conversion option

Last time I mentioned a Word-to-text converter, I felt like I had to make a point that, despite its age, it worked just fine.

Oddly, I feel the need to make the same argument again.

2013-09-13-v5-122p-catdoc

Truth be told, outside of .doc files, you might find catdoc somewhat disappointing; like antiword, it too doesn’t handle .docx files. Spinning one through just caused segmentation faults.

catdoc comes with a counterpart for Excel files called xls2csv. It’s equally effective with straight .xls documents, but I didn’t try it with newer versions.

I will acknowledge that time has left catdoc (and probably xls2csv too) in the lurch, but again, I have to acknowledge … they work.

antiword: You can’t deny it works

Antiword. I know the bulk of your criticism will be that, technically, this software is easily a decade out of date.

2013-08-12-v5-122p-antiword

The home page declares antiword capable of converting a long range of Microsoft Word formats — up to and including Word 2003 — to plain text or postscript.

Which nowadays isn’t very useful. I will acknowledge your criticism if you will acknowledge that antiword, despite its age, still does its job.

It’s one thing for a program to fall out of its span of usability, break into pieces with dependency updates, and lay panting on the roadside like a crash victim (where did this prose come from?).

But antiword is aging gracefully. Yes, its not capable of decoding docx. And I know it stutters at times with converted doc files in some situations — I’ve seen it happen, even in the past few years.

But it still does what it claims, works against modern distros, is at home in most current repos, even if it hasn’t been updated in a decade.

And as someone accustomed to working with hardware well outside the curve of modern technology, I can tell you that a 10-year-old document converter with no updates that still works is better than a 10-month-old fancy-pants composite manager under fervent development that doesn’t.

So take it for what it’s worth. :mrgreen: