Return to Snippet

Revision: 18920
at October 12, 2009 09:06 by sherbang


Initial Code
import delicious
fb = delicious.connect('<username>', '<password>')
tags = fb.tags()
for tag in tags:
  if tag['count'] == 1:
    fb.rename_tag(tag['name'], tag['deleteme'])
  if not tag['name'] == tag['name'].lower():
    login.rename_tag(tag['name'], tag['name'].lower())

#Now login to Delicious and delete the 'deleteme' tag.

Initial URL

                                

Initial Description
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

Initial Title
Quick and Easy mass tag deletion in Delicious

Initial Tags

                                

Initial Language
Python