Export a diigo list to markdown

Last Update: 08.08.2010. By azarai in python | snipplet

I use diigo as my bookmarking service and specially their list feature for collecting links of a research topic. Occasionally i need to export a list as markdown syntax. Luckily they got an api and theres also a python modul for it. So some minutes later this snippet was born:

from pydiigo import DiigoApi
api = DiigoApi(user='your username', password='your password')
list_name = 'your list name'
bookmarks = api.bookmarks_find(users='azarai', list=list_name)
for bookmark in bookmarks:
    print '-  [%s}(%s \"%s\") %s' % (bookmark.title.encode('UTF8'), bookmark.url, 
                                     bookmark.title.encode('UTF8'), bookmark.desc.encode('UTF8'))

I think it should be self explanatory. And maybe it saves you some minutes too :-)

Want content like this in your inbox each workday irregularly? No BS, spam or tricks... just useful content:

I understand and agree to the privacy policy