I’ve got this folder called vast/todo/t.temp that’s got a 100 GB of stuff from old computers in it. Typically, I just copy stuff there and tell myself I’ll get back to it. There are 61,287 files, none less than a year old, and (as of now) only 5 of those 60-thousand files are less than 2 years old.
How will I ever “get back to” making sense of all that junk? Enter duff – the CLI duplicate file finder. Just say:
Back in the day, I would use antiword to extract the text from a Word .DOC file. But it only understands DOC. Over the years, more and more Word files have been using the “open” (ha ha) DOCX format, which antiword doesn’t read. So I found Pandoc, which does much, much more.
$ pandoc -i some.docx -t plain > some.txt
There’s also a convert-to-Markdown option:
$ pandoc -i some.docx -t markdown > some.md
I find, however, that the Markdown produced by docx2md is more to my liking. It’s less cluttered, as it doesn’t aim at fidelity to the Word document’s formatting to the same degree as pandoc, but only the basics.
To install pandoc you can use the Macports version, but lately, I’ve found it easier simply to install the official binary Mac OSX PKG.
I used to use homebrew, but before that I used MacPorts. (And long, long, before that, fink.) The past year or two I’ve come back to MacPorts. But I forget what the commands are. (Honestly, I get them confused with apt, but that’s a separate problem.)
The usual thing to do is to search and then install:
port search whatever
port info whatever
port variants whatever
port install whatever +somevariant
The other thing is to update the stuff you’ve already installed
(This bug is perhaps unrelated to a separate problem â€” honestly, a bug â€” wherein someone decided it would be a good idea to change the file’s “modification” time every time a song was played. This is an idea so stupid I simply cannot imagine how anyone thought it was clever.)
Since the gem ecosystem keeps changing, and since I don’t write new programs very often, here’s a list of my favorite gems for developing command-line interface tools.
Option parsing gem: slop. (Since micro-optparse looks moribund; see here.) But (looking at programs I’ve written) I also seem to like trollop, a/k/a optimist. But I also like the fine-grained control of OptionParser.
Debugging output (not the same as logging): pastel
Wrapper for ImageMagick: About a decade ago, I couldn’t get RMagick (rubymagick?) to compile and I’ve never gotten around to checking back. For awhile I used %x<convert ...> or whatever, but now, if I’m working with images, I’ve sometimes found mini-magick helpful.
Proper Capitalization of Text Strings That Are Titles: titleize.
Parsing Biblical references (e.g., Romans 8:39 and Genesis 12:1-4): pericope.
I have this problem and can’t figure out what causes it. Once in awhile (more recently the past month or so, unless I’m imagining it) my bash autocomplete adds a trailing slash when it doesn’t belong there.
Q: if I have to learn about bash completion anyway, should I learn how to do my own bash completion scripts? Because I’ve found that tab to expand is about as smart as I want it to be. (I’m always frustrated on my Linux system because the default there is to notice what the command is and only offer to expand certain compatible filetypes.) Here are two places to get started:
The second book in this very occasional series is … well, any of Heinleinâ€™s juveniles. The cover is from the final book in the series, Have Space Suit, Will Travel (1958). It features bug-eyed monsters, space pirates, and a plucky hero who saves the earth from alien invaders over Labor Day weekend and still makes it back in time to get a free-ride scholarship at M.I.T. and throw a milkshake at the antagonist. Plus, we are taught a handy mnemonic for the order of the nine planets (see below) and a parable about frogs that isnâ€™t the one about boiling them slowly. (Sorry for all the spoilers, but you’ve had 62 years.)
For this posting of my #2 fiction book, I could have picked any one of the series. Theyâ€™re all great (except, I guess, Rocket Ship Galileo, the first). I mean, they were great when I first read them, starting in junior high school, when the science was only a little bit dated. (Venus had turned out not to have swamps, for example, and Mars never had canals. Jupiter’s EM environment would probably make Ganymede a poor place to farm.) Starting in 1953, after a few books set in our solar system, Heinlein got wise and set his stories somewhere more romantic.
But despite that, the juveniles are still great. Honestly, they’re better than most of Heinlein’s non-YA fiction. Practically all of it. Especially if you see Starship Troopers as the YA fiction that it ought to have been.
What are you waiting for? Get started! For a complete list, see the wikipedia article (search “heinlein juvenile”). But you’ll need to get them new. We never put the old ones back into circulation.
But the key point at issue is the great gulf separating [the gods] from us, together with the apparent randomness of the world and the non-intervention of outside divine forces. Much of the claim to be new, ‘modern’, and indeed ‘scientific’, at the time and ever since, has thus been simply the attempted justification of a much older worldview by appeal to new scientific discoveries and technological achievements. We glimpse all this, to repeat, after the event, seeing how things in fact turned out and the way in which this idea of a ‘modern age’ has subsequently taken hold on the Western imagination. I do not envisage a conspiracy in which people were saying, ‘Now, how can we re-launch Epicureanism without saying that’s what we’re doing?’ My case is more about long-term effects than explicit intentions, though the intentions, not least in their social, political, and ethical dimensions, were often at least implicit. What matters is the way in which the newness of certain scientific discoveries was used rhetorically to press the claim to the newness of the worldview. At the time [the 18th century], many leaders of the movement knew perfectly well that they were rekindling ancient fires. Those who today invoke ‘the modern world’ either ignore this or choose to forget it.