Bookmark Management on the Nokia 770

Ready to export your existing bookmarks onto the 770? Just as I wasn’t willing to enter in my RSS feeds by hand, the same goes for my bookmarks. I wanted to export my perfectly good bookmark lists in Firefox and put them on the 770, since it is supposed to stand in for my laptop surfing around the house. The virtual keyboard is not an option.

Luckily a few good things have happened: back in 1998 some Python hackers wanted to show off the XML support in Python, so they created the XBEL format for the exchange of bookmark data. And the smart folks at Nokia are using a bookmarks manager application that uses XBEL raw (just as the RSS reader used OPML raw for its feed list). I am impressed that Nokia is cutting edge as far as open file formats are concerned. And finally, Firefox can spit out its bookmarks as XBEL, with the proper extension.

The final piece was tracking down the elusive bookmarks file on the 770. There is a file located in your home directory (/home/user/.opera/customurls) that looks promising, but it turns out that it’s not the bookmarks file. That file resides over in the /usr/share/osso-bookmarks directory. From what I can determine, while the browser is a port of Opera Mobile, the bookmarks manager is its own application that is not related to Opera.

Warning: this procedure is a hack, and a laborious one at that. What we need is a Python script to take the XBEL export from Firefox and convert it to the XBEL format that the 770 likes (see my issues section below). Till then you can use an XML editor to cut, paste, and edit the attributes of your bookmark objects in XBEL and massage them into the format that the 770 accepts.

The method I outline below works, but it’s a PITA. To me, it’s easier than typing all my bookmarks via the virtual keyboard. But I used this on a subset of my full bookmark list. I’m working on the Python script (when I have the time).

Overview

There are four major steps to this:

  • Get the bookmarks file from the 770
  • Export bookmarks from Firefox
  • Use XML editor to copy and clean data
  • Copy the bookmarks file back to the 770

Transferring Bookmarks to Desktop

  • Using MMC and USB

    • Windows/Macintosh/Linux
      • On the 770 open an xterm and copy the bookmarks file over.
      • $ cp /usr/share/osso-bookmarks/bookmarks/MyBookmarks.xml /media/mmc1
    • Then plug
      in the USB connector into your desktop and copy the MyBookmarks.xml file
      to your desktop computer.

  • Using SSH
    • Setup your ssh environment
      • You should already have your ssh environment setup, using the
        DropBear ssh server and clients. You need to follow the
        Dropbear installation directions and have your authorized_keys
        file setup on your 770 with the identities of your Desktop Host.
        In this case, I have the ssh server running as root, so I’m
        not specifying the port in the scp command.
      • To ssh over your bookmarks file to your Desktop:
        • dillera$ scp user@192.168.251.53:
          /usr/share/osso-bookmarks/
          bookmarks/MyBookmarks.xml .
        • Don’t forget that period ‘.’ at the end of that last command- it means copy that file into the directory that you are currently in (on your desktop computer).

Exporting Firefox Bookmarks

Get Bookmarks Synchronizer Extension

  • For
    up to version 1.5 of Firefox you need this
    version
    , For
    version 1.5 this
    one
    .
  • Export your bookmarks
    • Bookmarks/Synchronize bookmarks
    • Advanced Tab
    • Uncheck everything but “Check the XBEL public…”
    • Click on the Export XBEL button
  • Name your xml file appropriately.

Opening and Editing the Bookmarks File

  • Finding an XML Editor
  • Downloading the DTD
    • Download the XBEL
      DTD
      at http://www.python.org/topics/xml/dtds/xbel-1.0.dtd
      and install it into your XML editors plugin directory (or where ever your
      editor wants DTD to go).
  • Use the XML editor to copy and paste your
    bookmarks into your existing MyBookmarks (from 770), keeping in mind the issues
    listed below and removing and adding the data that the 770 requires.

Issues:

  • Differences in XML
    formats on the 770 and Firefox XBEL

    • Firefox: Inside each folder and bookmark
      element, Firefox stores a rdf attribute, unfortunately
      you need to remove it.
    • 770: The bookmark object requires
      the info element as a child, which contains the metadata element as its child.
      The metadata element contains two attributes: the time that you added the bookmark and the time you
      last visited the site. You must add these into the copied bookmark elements
      from Firefox, or the 770 bookmarks application won’t read the file.
    • 700: Folder element: requires
      a ‘folded’ attribute, as well
      as the same info/metadata child elements and their attributes that exist in the bookmarks elements.

[Thanks for Roger Sperberg’s comment and correction on my XML nomenclature!]

Once you are done editing the MyBookmarks.xml file, save it and copy it (ssh or MMC card/USB) back over to the 770. Make sure that the bookmarks application is not running on the 770. Then start the bookmarks application and check out your bookmarks.

Following are two screen shots from the ELFData editor on the Mac, showing the XBEL output from Firefox and the MyBookmarks.xml file from the 770. You can use just a text editor for this of course, but I found that the ELFData editor let you copy and paste objects so moving them around with their attributes was easy.

I’m also fooling around with BookMark Bridge, available over at sourceforge. I’m trying to built in on my Ubuntu powered Powerbook G4, and once it’s built I’m hoping that it will let me mange these XBEL files better.

Screen shots are on the Extended Page….

Here are some screen shots:

XBEL export on Firefox, from the Bookmarks Synchronizer:

DeerPark_bookmarks-sync.png


XML from Firefox:

XML-Editor_xbel-firefox.png


XML from 770:

XML-Editor_xbel-770.png

4 thoughts on “Bookmark Management on the Nokia 770

  1. […] The Syncing Apple: “I wanted to export my perfectly good bookmark lists in Firefox and put them on the 770.” […]

  2. Hey this is a test of a reply.

  3. Thanks – I’ve updated the posting with the proper terms.

  4. Wow, thanks for this. I’ll be following these steps soon.

    Minor clarification — When you say “The bookmark object requires the info attribute, which contains the metadata attribute,” that doesn’t make sense in XML, since attributes can’t contain further attributes.

    Looking at your screenshot, it appears you mean to say the element requires an element as a child, and it in turn requires a child element.

    I think also when you say “folder object” you mean element, which does indeed have a folded attribute. The word “object” in XML syntax doesn’t really pertain.

    And then I see you are an e-book reader too. I too am reading almost entirely Plucker titles — have you found any English titles in FB2?

    Roger

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.