Putting Your Reading List Online #

Lately, I've been playing around with Delicious Library, and after a few days of tedious labor (I am iSight-less), I have imported my entire collection of books into it. Once I had all this data gathered, I wondered what I could do with it. Unfortunately, while the program has all sorts of clever ways of getting data into it, it's much more miserly when it comes to exporting it. The only officially supported feature is an export command that outputs a CSV file. Unfortunately, with no AppleScript or Automator support, there's no programmatic way of invoking it.

However, as it turns out, Delicious Library stores all of its data in an XML file. ~/Library/Application Support/Delicious Library/Library Media Data.xml has a very sane schema and is easily parsed (I'm obviously not the first to realize this, some Googling turned up this FileMaker import script for example). With this in hand, I decided to complement my automatically updated online reading list with a book analogue.

The result is my book reading list, which is also linked to from the sidebar. A cron job periodically uploads my Library XML file to my server. There, another cron job reads it, generates a simple HTML file, and tells Movable Type to refresh the relevant template. I figured that dumping my entire library would not be all that interesting, so instead I picked a few "shelves" that I use to keep track of recent purchases and books I should read.

The source to the simple generator script is available It relies on ElementTree for its XML parsing. I am considering putting more metadata into Delicious Library, such as personal reviews, to play around with the hReview microformat. Other output formats are possible as well: my reading list may not be that exciting, but having other erudite people's available as RSS may be.

1 Comment

Hi Mihia,

I am currently developing a website to store reading lists online, www.bookwormr.com. It's still a bit rough around the edges. I found out about Delicious Library from your article and would like to be able to import from it into my website. However, I don't own a Mac, would it be possible for you to send me an example of the csv exported file and also the xml file?


Post a Comment