Footnotes, Textpander, and shell scripts
A while back I wrote a rather well-received piece on how to create footnotes with unique anchors using Textpander. Not long after writing that post, the author of Textpander sold the application and dropped its donationware pricing model — it’s now known as TextExpander and costs $30. That said, the older versions continued to work just fine as long as you didn’t upgrade, and I wasn’t required to upgrade until I moved to my new Mac Pro last week.
Though it’s likely I’ll eventually pony up and pay the rather high admission price — it’s great software — I’ve just quickly whipped up the following shell script to hold me over in the interim (at least as far as footnotes are concerned). Realize that it’s been broken up a bit so as to not cause IE to render it improperly (grr!).
#!/bin/sh
dateid=$(date +%m%d%y)
echo
echo Footnote reference:
echo
echo <sup id=r1-$dateid><a href=#f1-$dateid>1</a></sup>
echo
echo
echo Footnote:
echo
echo <div class=footnotes>
echo <hr />
echo <ol>
echo <li id=f1-$dateid>
echo <p>FOOTNOTE <a href=#r1-$dateid>↑</a></p>
echo </li>
echo </ol>
echo </div>
Is this as elegant? Of course not. Does it do the trick? Absolutely. Well, kinda. I may try to come up with some funky Quicksilver voodoo to have this script launched from a QS trigger and the output copied to the clipboard, but probably not before I actually end up buying TextExpander.