Export WordPress links as XBEL

Written in the wee hours in English • Tags: , ,

I wanted to see if I could have my WordPress links in the Firefox Bookmarks menu. I thought this should be possible, since it knows about RSS. From using reBlog I had learned about FeedCreator, which is a great package for quickly creating feeds. So I enhanced wp-links to support feeds.

However, I was to be disappointed — the links are in Firefox now, but they are all piled up together in a single huge menu. In the WordPress database the links are categorized, as can be seen on my links page. I was hoping Firefox would use the categories to create more subfolders.

I thought about another approach: XBEL. The format is simple enough to follow, so I added XBEL support to FeedCreator 1.7.2. This works perfectly with the Bookmarks Synchronizer plugin for Firefox. I’ve configured it to download a single subdirectory inside Bookmarks, and all my WordPress link categories show up as subdirectories inside it.

I’ve made some sample code available to show how I’m calling wp-links. The code won’t run as-is, as it calls some other libraries I’m using. It should be simple enough, though, to remove (or ignore) the “extra” stuff.


  • 1

    Hey, I came across your site through the WP support page. I’ve been trying to figure out for some time how to be able to keep a real-time sync of my Firefox bookmarks on my website. I’ve learned that trying to use a script that translates XBEL into HTML is probably the way to go, but the only standalone script I’ve found, only supports Firefox and IE.

    I’m not the most experienced of users, although I’m getting there. However I’m afraid this means that I do not completely understand your approach. This is a WP-plugin you’re using right?

    Do you know of any stand-alone XBELHTML scripts that work well? Can you walk me through re-creating your success?

    Asa Nathannael Hunt — 6.9.05 @ 0:04

  • 2

    Hi Asa!

    I’m afraid what I have is not what you are looking for: I only download my WordPress-managed links to the Bookmarks menu of my Firefox browsers. I’m not uploading bookmarks from Firefox.

    There is an XBEL-importer for WordPress, I think, but not included with the distribution. But I don’t think you can call it over the web, which would have been the easiest approach for Firefox. You could upload the bookmarks from Firefox, and have a separate script check for new uploads on the server, but that would require more coding. (I have not implemented that in my own setup.)

    It would be nice to be able to fully synchronize bookmarks between WordPress and Firefox. However, the necessary conflict resolution would be rather complex. If you have added a new bookmark in WordPress, but happen to upload from Firefox before downloading, should the new bookmark just be deleted? Or should new bookmarks from Firefox just be merged in, without deleting anything? What about bookmarks that have been moved between categories?

    For the time being I’ve been very happy with just having a copy of my WordPress links available on my browser for quick access. If I need to add new bookmarks, I typically do so with the WordPress administration interface. I rarely add bookmarks to the browser manually.

    The HTML page is created from the WordPress database directly. It is not converted from XBEL. However, since XBEL is XML, it would be not-so-difficult to write an XSLT or CSS style sheet for it for a more pleasing display. However, I doubt I could come up with a style that results in a display similar to that on my links page.

    Kimmo Suominen — 11.9.05 @ 10:53

Sorry, commenting is not available for this post.