Tuesday, February 15, 2005

ยง

a hack with all the elegance and beauty of terminal surgery



Typepad has this natty feature where your reading material is displayed in the sidebar. I, with my meagre tools, and even more meagre skills does not have the ability to figure out this one. However, I do have a little creativity and an eye for a half-assed hack, which to be quite frank is what holds this virtual tome together. (Think of it as one of those books which ends up in the 'free!' basket of a second hand bookshop, soaking up drips from the leaking ceiling, and would crumble in the hands of anyone who tried to pick it up.)

Regardless, I will proffer my 'wisdom' and 'ingenuity' upon you. I know that you didn't ask, and probably wouldn't but this is a monologue, ok?

I use Bigbold's very elegant rssdigest. This provides a RSS summary leaving you with a line of JS or an iframe to insert into your site which generates a nice little list. I've used this to generate live bookmarks for my site by combining this with del.icio.us (long may she live). Still with me? (Do i care?) del.icio.us uses tags and descriptions and rssdigest can be formatted using its custom tags and regular HTML. This can, amongst other things, insert the del.icio.us description into the rssdigest entry. You can tell del.icio.us to restrict the feed to just one tag by one user through the format http://del.icio.us/'username'/'tagname', or for the RSS http://del.icio.us/rss/'username'/'tagname'. Simple, non? Nearly there.

So, I can post the Amazon URL to del.icio.us and create a tag called recentreading creating a link between del.icio.us and the Amazon page. But what about the nice little thumbnail? Remember you can format rssdigest, and that this accepts regular HTML, and that as well as tags you have the description field in del.icio.us? So, I inserted the URL of the bookcover's JPEG from Amazon into that spare field. I then formatted rssdigest so that rssdigest's description field was surrounded by a img tag with the code src=" immediately preceding it and " /> closing the src and the tag after it. This parses the description, i.e. the JPEG's URL, into the feed giving me little icons of the books.

And it is relatively easy to use. 1> Find your book on Amazon, 2> right click (control click for mac folk) and copy the location of the little JPEG you want to use - I use not the one at the top of the page, but the one half way down where you have the 'buy two and get a discount' offer, 3> hit the 'post to deli.cio.us' button on your browser's toolbar, and finally, 4> paste the URL of the JPEG into the description field and type recentreading into the tag. All done! Easy! (ish).

Cool! Well, ok, I was pleased with it.


posted by andrew atkinson at 8:24 AM  

Powered by Blogger