Mozilla bookmarks.html to del.icio.us
This little script reads in a mozilla-style bookmarks.html file and uploads the contents to delicious.
Usage
- Prepare a bookmarks.html file. A variety of programs and services import and export suitable files. Backup your bookmarks file if necessary. Organise your bookmarks into folders, bearing in mind that a bookmark will be assigned a tag for each folder it's in (e.g. if I put something in foo/bar/baz, it'll be tagged foo, bar, baz).
- Grab ruby. If you are a windows user, grab this one-click installer.
- Download the file parse-bookmarks.rb
- Edit the variables near the top marked 'variables to be configured by user' to suite your tastes. I'd suggest setting a real username and password ;)
- Run it. The first argument needs to be the bookmarks.html file. If you are using windows, you may be able to drag-and-drop the bookmarks file on top of the script.
- The script will prompt you to supply tags to replace those it has generated which have invalid characters. You can replace one tag with many, which is pretty useful. Note that no checking is made on the replacement tags at present so don't feed in more invalid ones!
- Make a cup of tea (note: it's very important you don't make coffee by mistake). It takes at minimum one second per bookmark, so e.g. I did 309 bookmarks which would take a minimum of 5 minutes.
The Files
COPYING (18K) parse-bookmarks.rb (3.6K)
Suggestions
...are most welcome. Email me ideas, rants, flames, code, etc.
Similar
- BookmarksToDelicious.py does a similar thing.
Mental Notes
Brian McCallister's bloglines monitoring script seems to use a better method for authenticating than this script.