1 November 2005

Hatin’ on DRM

I’m a Mac/iPod/iTunes guy, and I hadn’t really had a big problem with DRM personally (whatever I might think about it philosophically). That is, until the other night, in an episode I was reminded of when taking a look at Aaron’s presentation on downloading.

Actually, the vast majority of my music is legally purchased. It’s ripped from my CDs or bought from iTunes (or it’s free). The other night, I had a yen to hear a song I had just purchased on iTunes. I launched iTunes on my boyfriend’s PC (because his computer has speakers), looked in the library of songs shared over our home network, and tried to play it. It asks me to authorize his computer to play my music, so I put in my password. And then it doesn’t play.

Why? I’m using the latest version of iTunes, and he’s not. Sure, I can fix this by updating iTunes on his computer, but I wanted to hear the song right now. Was it really necessary to break this and annoy me?

Mark it down!

I’ve been using Markdown, a simplified syntax for creating (X)HTML, on this blog since it started, and I’ve also adopted it for a number of things that aren’t fussy enough to want a word processor or LaTeX to do. But that’s exactly the problem sometimes: I want print output, and I want something simple like Markdown to get it, rather than fooling around writing LaTeX (just like I don’t want to fool around writing XHTML). Other people want this too, so I’ve lurked around the Markdown discussion list seeing what ideas there are. Most of the talk has involved hacking up Markdown (written in Perl) to make it spit out LaTeX instead of XHTML, but my Perl is about as good as my Spanish (which is to say, not good), and besides, this is a maintenance nightmare.

Then I stumbled on Fletcher Penney’s MultiMarkdown, which adds the following to Markdown:

  • create a full XHTML document (with the headers, etc.) instead of just a snippet
  • add basic metadata used in XHTML and LaTeX (title, author, etc.)
  • footnotes! (which are a proposed addition to the “official” Markdown)
  • a set of XSLT stylesheets for transforming the XHTML into LaTeX

This is better, because my XSLT is like my German, which is at least intelligible. And with the addition of footnotes (and a semi-standardized way to represent them in XHTML), the XHTML should be capable of bearing the semantic burden necessary to get LaTeX out of it with relatively little manual cleanup afterward. I have to work on the stylesheets to get exactly what I want out of them, but once they’re done, they’re pretty stable for my purposes.

This is still a branch from Markdown, but it’s necessary for me until Markdown includes footnotes. I think I will work on refactoring the other additions (full document & metadata) into a preprocessor for Markdown, so the chain is something like:

 myPreprocessor.pl sample.txt | Markdown.pl | SmartyPants.pl |
 xsltproc xhtml2article.xslt > sample.tex

Then I can just replace Markdown.pl with any upgrades or bug fixes without “fixing” it.

Gee, it’s really nice to have had a couple hours to finally work that out last night, because it’s been on my list of things to do since August but it seemed so daunting. As it turns out, not really that bad.