I have to confess that many years of using Macs, combined with a
monkey curiousity that led to deep familiarity with the platform, has spoiled me: when my computer should be able to do something, I expect it to Just Work because it almost always does. And I get annoyed if it doesn’t.
The latest example began last weekend. Exploring the
43folders site, I found a clever little kit called the
Hipster PDA. Like most geeks, I like low-tech when it works, and this is as low-tech as it gets: a build-your-own personal data assistant consisting of a stack of index cards and a binder clip. Sitting in the living room with the iBook, I thought to myself, “I’d like to try that. I wonder if I could find some index cards around here.” Then I glanced over at the lamp table, and lo! a stack of index cards, left there by someone and never put away, awaited. Figuring this was a Sign From Above, I put down the laptop and located a binder clip.
With a place to keep ideas, project tasks, and miscellaneous to-dos, my brain started suddenly remembering things I wanted to do around FAR Manor (and work) at odd moments. I could just whip out a pen and my stack, jot it down, and move on. I wound up with a rather intimidating shipping list for Home Depot, and a longer list of stuff to do around the house than I really wanted to recognize. I soon needed expansion memory (i.e. more index cards), and found the supply cabinet at work has both color and regular cards. Having found a useful way to capture and remember all those little things that could be done later, I started looking at it a little deeper, thinking about accessories (this is how male geeks keep in touch with our inner female: we accessorize our gadgets, not our wardrobe). Oh cool, how about
some templates to print on the index cards?
So I downloaded the PDF, grabbed a handful of blank index cards, fired up Preview, and tried printing a few pages. The laser printer dutifully sucked in the cards, and spit them out — still blank. Suddenly realizing I needed to create a 3x5 page size, I did so and tried again... with the same results as before.
I went into full-blown troubleshooting mode at this point, trying all sorts of different things including installing new printer drivers and trying a different printer. Nothing worked, although at one point I managed to get the first two inches of a page to print at the bottom two inches of the card. It got late, and I gave up for a night that turned into a week.
Some time during the week, a thought hit me: if I could get the image to print at the top-center of the page, it should print on the card. I knew of two ways to make that happen — import each image into a page layout program by hand, one at a time, or use good old
groff to do it all for me at once.
For those of you who aren’t familiar with *roff or other batch-style formatters, that’s the way most of us produced complex documents before 1990 or so. For books, or collections of books, not even the best GUI programs can yet match the capabilities of groff, and don’t even come close to matching their speed or efficiency. I’ve actually turned back to using groff at work because even FrameMaker is too slow and clunky to do what I need nowadays.
Once I hit on that idea, I had my printed cards in a few minutes. I opened a Terminal window and began the incantations:
$ pdf2ps diyp3h_core_1up.pdf diyp3h_core_1up.ps
$ for (( i=1; i<=84; ++i )); do
> psselect -p${i} diyp3h_core_1up.ps pg${i}.ps
> eps2eps pg${i}.ps pg${i}.eps
> rm pg${i}.ps
> done
Now I had 84 EPS files, one for each page in the PDF file. To do anything with them, I had to create a file of groff commands to put each index card at the top of an otherwise blank page:
$ ls *.eps | awk '{print ".bp"; print ".PSPIC $0";}' >cards.t
I opened the PDF, identified cards I didn’t want to print (and those I wanted multiple copies of), and edited cards.t accordingly. Finally, I stuck the cards in the printer and typed:
$ groff cards.t | lpr
The first couple of cards came out crooked, until I squeezed the paper guides together a little more tightly. My Hipster upgrade was quickly ready; now I just need some time to copy the data over....