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 '' 

Posted in python, software

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>