Subscribe to
Posts
Comments

Delicious Python

Or why I love popular scripting languages, reason number one zillion.

I use Sage with Firefox to keep up with various blogs, and del.icio.us as a URL dumping ground.

It took me approximately five minutes to find a Python interface to del.icio.us and write a script that turns sets of tagged URLs into an OPML file that I can either drop into Sage or post to my blog:

 import delicious deli = delicious.DeliciousNOTAPI() blogs = deli.get_posts_by_user('bos', 'blog') print ”'  ”' for blog in blogs:     blog['description'] = blog['description'].lower() blogs.sort(lambda a, b: cmp(a['description'], b['description'])) for blog in blogs:     print ” %         (blog['description'], blog.get(’extended’, ”), blog['url']) print ” 

Leave a Reply