Turion's blog

del.icio.us delete?

(Some bugs with the method actually...) How to delete easily posts in deli.cio.us? Say, cancel an import of several hundred posts? Looked for a smart way, found none working. So here's a three-step solution. 1. First of all, the del.icio.us API allows to delete a post defined by its url. So, we need an urls list. You can get one by using the Firefox developer toolbar extension, with information/view link information. With a few replaces, you can then get a file with a list of urls (one per line). These are the URLs you're gonna delete, so check they're the right one. In my case, the idea was to cancel an import, so I saved my del.icio.us page of the "imported" tag. 2. With a simple PHP function, we make the links to point to the del.icio.us API deletes : $lines = file('one.txt'); for($linenumber=0;$linenumber<=100;$linenumber++) { echo '<a href="https://api.del.icio.us/v1/posts/delete?url='.$lines[$linenumber].'">'.$lines[$linenumber].'</a><br />'; } 3. You then get a list of links to click. You can then get some Firefox extension like Linky to click them all at once. to implement: have step 1. and step 2. done by PHP as well. Regarding step 1, there was a bug in deli.cio.us that echoed a XML error when trying to have the API get all "imported" tagged posts, but I guess we could get the links with some deli.cio.us RSS and then parse it with PHP...

2006-09-26

Sorry. I'm too lazy to make it work under IE. Get Firefox or something.