gbookmark2delicious 3.0

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.)

Installing

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

Usage

Now create a ~/.gbookmark2delicious.auth containing the following four lines:

your.google.username@gmail.com
your.google.password
your_delicious_username
your_delicious_password

Now you’re ready to run gbookmark2delicious!

$ 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

Final comments

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.

Enjoy!

Follow me on Twitter for stuff far more interesting than what I blog.

  • i have one question,what if i want to retrieve my old bookmarks that are deleted,can i do that?

  • Hi Yang, that’s super impressive! You definitely know your IT.

  • Thank you for this valuable information that all webmasters can use to improve their websites!

    Free Energy Technology

  • get girlfriend back

    Love the blog and article…would you mind if I talk about this on my blog?

    get girlfriend back
    http://www.getgirlfriendbackblog.com

  • very good post,  thanks for sharing.

  • Roded

    Great idea. 
    Thanks for the work and post.

    But, it seems to fail on certain bookmarks (?).
    Is there anywhere bugs can be posted?

    /usr/lib/python2.6/site-packages/pydelicious.py:90: DeprecationWarning: the md5 module is deprecated; use hashlib instead  import md5, httplib2011-08-22 17:14:49,210 INFO     main                : getting google bookmarks2011-08-22 17:14:49,212 INFO     main                : authenticating with google2011-08-22 17:14:51,802 INFO     main                : google authenticated, got all bookmarks2011-08-22 17:14:51,806 INFO     main                : parsing google bookmarks2011-08-22 17:14:57,941 INFO     main                : building google bookmarks into data structureTraceback (most recent call last):  File “/usr/bin/gbookmark2delicious.py”, line 5, in     pkg_resources.run_script(‘gbookmark2delicious==3.0’, ‘gbookmark2delicious.py’)  File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 448, in run_script    self.require(requires)[0].run_script(script_name, ns)  File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 1173, in run_script    exec script_code in namespace, namespace  File “/usr/lib/python2.6/site-packages/gbookmark2delicious-3.0-py2.6.egg/EGG-INFO/scripts/gbookmark2delicious.py”, line 416, in   File “build/bdist.linux-x86_64/egg/commons/startup.py”, line 177, in run_main  File “build/bdist.linux-x86_64/egg/commons/startup.py”, line 152, in   File “/usr/lib/python2.6/site-packages/gbookmark2delicious-3.0-py2.6.egg/EGG-INFO/scripts/gbookmark2delicious.py”, line 381, in main  File “/usr/lib/python2.6/site-packages/gbookmark2delicious-3.0-py2.6.egg/EGG-INFO/scripts/gbookmark2delicious.py”, line 202, in parse_googAssertionError: bkmk(____recursion_guard = True, labels = [u’cellphone’, u’health’], name = u’u05e0u05e2u05e0u05e2 – u05deu05d7u05e9u05d1u05d9u05dd – u05d0u05e0u05d8u05e0u05d5u05ea u05e1u05dcu05d5u05dcu05e8u05d9u05d5u05ea’, desc = u”) vs (u’Welcome To LastPrice Israel – Arie Group Since 1962′, u”, u’israeli’)

  • Roded

    Doh.. sorry about that 

  • Hi, yes you can file bugs at http://code.google.com/p/gbookmark2delicious/issues/list. I’m happy to take a look but I’ll need some more info. Would you mind filing the bug there but also include your cached Google bookmarks file, ~/.gbookmark2delicious.cache/goog.html?

  • Thanks for the link Yang Zhang, I also  wondered where I can file bugs at!

  • AAA
  • AAA
  • AAAA
  • AAA
  • AAA
  • AAA

    maryfi is a free and easy to use virtual router software creator for Windows 7 , 8 and 8.1 computers. With Maryfi, users can wirelessly share any Internet connection: a cable modem, a cellular card, or even another Wi-Fi network. Other Wi-Fi enabled devices including laptops, smart phones, music players, and gaming systems can see and join your Maryfi hotspot just like any other Wi-Fi access point and are kept safe and secure by password-protected WPA2 Encryption. MaryFi works in case you are using proxy or even vpn connection.
    free virtual router

  • AAA
  • AAA
  • AAA
  • ???? ??????

    ??? ?????? ?????? ?????????? ?? ??????? ??????? ?? ???? ??? ?????? ????? ??? ?? ??? ????? ????? ????? ?? ????? ?????? ?? ??????? ???????
    ???? ??? ?????? ?????? ????????
    ????? ??????? ?????????? ???? ????? ????? ??????? ??????? ??? ???? ????? ????????
    ???? ????? ????? ???????
    ???? ????? ?? ????? ???? ?????? ??????? , ???? ??? ?????? ??????? ????????. ???? ???
    ???? ??? ?????? ?????? ???????