Scuttle2Del.icio.us
Yes, it can be done, thanks to the del.icio.us api and this howto from bwolf at Syntactic Sugar. OK, it’s not the easiest thing in the world, but it’s not impossible. Let me add my notes to the howto since commenting has expired. Note that I’m on an even older version of Scuttle than bwolf, 0.4x.
To export all of your Scuttle bookmarks, go to the URL http://your-scuttle-installation/api/posts_all.php. You’ll be prompted for a username/password, so enter your Scuttle username and password.
And now for the annoying part. Since XML is so picky about character encoding, you’ll probably have some funky characters that will cause errors when you try to export your marks from Scuttle. The easiest way around this is to log in to your Scuttle install and search for the bookmark causing the problem, then edit it to remove any funky characters. Rinse and repeat. I only had to fix two bookmarks, so not so bad.
Once you’ve got the export done, you’ll need to transform the XML file you exported from Scuttle to the del.icio.us format. Copy and paste the XML stylesheet from the howto (it’s the second block of code) to a text document and save it with a .xsl extension. You’ll need to search and replace the quotes in this file as the blog software evidently doesn’t use just plain-old quotes and will cause you problems in the next step.
Now you need to download Saxon; I used the .NET version. The instructions in the Saxon documentation are spot-on, but for the lazy: Transform.exe -t your-scuttle-export.xml stylesheet-from-howto.xsl > outfile.xml. Yes, it’s a command-line app. If you get additional encoding errors, just use a text editor to fix/remove the offending characters; I had about three more bookmarks I had to fix.
After that, you have a file that’s ready to be imported to del.icio.us. Grab the python script on the howto site (the third block of code), change the path to python on your system on the first line, enter your del.icio.us username and password on the sixth line, save it, make it executable, then run it with ./whatever-you-called-the-script.py outfile.xml. When I ran that I got an error after several minutes, and I think it was likely a connection timeout or something. I went to del.icio.us and found the last bookmark that got imported, went back to my XML file and deleted all the posts up to that one and ran the script again. So far so good, and soon I’ll have the 1,100 bookmarks I have in Scuttle in my del.icio.us account, all tagged and dated.
May 28th, 2007 - 9:52 am
Great - thanks! Couple of things I encountered:
- If you copy and paste the stylesheet code from syntactic-sugar, you may need to retype and replace all the inverted commas (”), as Saxon doesn’t recognise them and errors at first.
- If people don’t have Python, you can run Portable Python on your computer (http://www.portablepython.com/) without installing anything. To make the Python part simple, copy the Saxon-converted xml file and the python program (from syntactic-sugar) into the root PortablePython directory. Then, modify the python program to remove the path from the first line (so it ends up just ‘#! python’) and run it!
May 28th, 2007 - 10:02 am
[…] I’ve been running my own social bookmarking program for a while on this site, but the time has come to upgrade. Trouble is, the program that i’d been using - Scuttle - hadn’t been updated for a while, and there was no exporting function. It was a pain, frankly, until I found this writeup: Scuttle2Del.icio.us […]