Posted By

sherbang on 10/12/09


Tagged

delicious


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

techdetours


Quick and Easy mass tag deletion in Delicious


 / Published in: Python
 

After imposting my bookmarks to Delicious and having it auto-tag all my bookmarks (some auto-categorization was why I did this in the first place), I had more tags then bookmarks, and about half of the tags were only used on 1 bookmark. I felt that these tags were providing a lot of clutter and little benefit. Deleting tags in Delicious is a long process, so I put this script together. This renames all the single-use tags to "deleteme", so once it's done you just login and delete that 1 tag and the problem is solved. It also lowercases all tag names to be consistant with the tags in Delicious.

Depends on delicious.py - get it here: http://github.com/mudge/python-delicious

  1. import delicious
  2. fb = delicious.connect('<username>', '<password>')
  3. tags = fb.tags()
  4. for tag in tags:
  5. if tag['count'] == 1:
  6. fb.rename_tag(tag['name'], tag['deleteme'])
  7. if not tag['name'] == tag['name'].lower():
  8. login.rename_tag(tag['name'], tag['name'].lower())
  9.  
  10. #Now login to Delicious and delete the 'deleteme' tag.

Report this snippet  

You need to login to post a comment.