gbookmark2delicious is a simple command-line tool that will synchronize your Delicious account against your Google Bookmarks account, effectively enabling a public feed for your Google Bookmarks. I recently rewrote it to work again (the new Google Bookmarks broke the old code), introduced bulk export and import for substantially improved performance, and ironed out encoding quirks/differences between the two services.
Not too long ago, Google Bookmarks introduced Lists, which got me excited because I thought they were a way to publish bookmark feeds, which would allow me to retire gbookmark2delicious. It turned out to be pretty different—Lists generate a feed for any updates to the pages in the List. (Plus, adding new bookmarks requires that it be explicitly added to the List, and the bookmarklet for doing so is IMO less usable than the regular Google Bookmarks bookmarklet.)
To get started with gbookmark2delicious, first download and install the prerequisites. On Ubuntu 9.10, run:
sudo aptitude install python-beautifulsoup python-feedparser python-mechanize cd /tmp/ wget 'http://pydelicious.googlecode.com/files/pydelicious-0.5.0.zip' unzip pydelicious-0.5.0.zip cd pydelicous-0.5.0/ sudo python setup.py install
Next, download and install gbookmark2delicious:
cd /tmp/ wget 'http://gbookmark2delicious.googlecode.com/files/gbookmark2delicious-3.0.tar.gz' cd gbookmark2delicious-3.0/ sudo python setup.py install
Now create a
~/.gbookmark2delicious.auth containing the following four lines:
firstname.lastname@example.org your.google.password your_delicious_username your_delicious_password
Now you’re ready to run
$ gbookmark2delicious /usr/local/lib/python2.6/site-packages/pydelicious.py:90: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5, httplib 2010-04-28 02:28:13,453 INFO main : getting google bookmarks 2010-04-28 02:28:13,499 INFO main : authenticating with google 2010-04-28 02:28:14,706 INFO main : google authenticated, got all bookmarks 2010-04-28 02:28:14,714 INFO main : parsing google bookmarks 2010-04-28 02:28:17,646 INFO main : building google bookmarks into data structure 2010-04-28 02:28:20,099 INFO main : getting all delicious bookmarks 2010-04-28 02:28:20,721 INFO main : authenticating with delicious 2010-04-28 02:28:21,587 INFO main : delicious authenticated 2010-04-28 02:28:24,780 INFO main : got all delicious bookmarks 2010-04-28 02:28:31,158 INFO main : parsing delicious bookmarks 2010-04-28 02:28:33,046 INFO main : building delicious bookmarks data structure 2010-04-28 02:28:35,475 INFO main : add 5 rem 1 upd 0 2010-04-28 02:28:35,476 INFO main : generating file to import into delicious 2010-04-28 02:28:35,477 INFO main : producing page for delicious to import 2010-04-28 02:28:35,478 INFO main : importing bookmarks to delicious 2010-04-28 02:28:36,308 INFO main : successfully imported to delicious
I have the following entry in my crontab to make gbookmark2delicious run every hour, a quarter past the hour:
15 * * * * gbookmark2delicious
By default, gbookmark2delicious always pulls your Google Bookmarks, but only touches Delicious if there are pending changes, otherwise relying solely on its cache of Delicious (stored in
~/.gbookmark2delicious.cache). gbookmark2delicious synchronizes your Delicious account to mirror your Google account—it not only adds to Delicious any bookmarks that are new in the Google account, but also removes deleted bookmarks and updates bookmarks that have changed tags and/or descriptions.
Follow me on Twitter for stuff far more interesting than what I blog.