Converting Safari Bookmarks to Firebird Bookmarks using XSLT

Peter Rukavina

I like Safari, especially the fact that my Safari bookmarks are automatically synced to my iDisk. But I also like Firebird, and I’d like to use the same bookmarks in that browser as I do in Safari.

Safari stores its bookmarks in:

~/Library/Safari/Bookmarks.plist
which is an XML file.

Firebird stores its bookmarks under:

~/Library/Phoenix/Profiles/default/[uniqueid]/bookmarks.html
which is a wonkly-formatted HTML file based on the original Netscape bookmarks file format.

Converting from the Safari-format XML file to the HTML-format Firebird file seemed like a good task to use XSLT for.

Using TestXSLT from Marc Liyanage as a testing tool, I created this Safari2Firebird.xslt style sheet that can be used to transform a Safari bookmarks file into a Firebird bookmarks file.

To do this using TestXSLT:

  • Under the XML tab, select the Safari Bookmarks.plist file.
  • Under the XSLT tab, select the Safari2Firebird.xslt file you downloaded here.
  • Click Process and, optionally, save the result as bookmarks.html and copy to your Firebird profile directory.

I’m neither an XSLT expert nor particularly familiar with Firebird, so I may have missed something here, and this may not work for you. I welcome comments on how to improve the process.

Update: Marcus Kazmierczak helpfully modified the script; here’s his explanation:

I convert the BookmarksBar Folder to Firebird’s Personal Toolbar (including setting the property). I also discard the Address Book and Rendezvous folders and move all the folders in the BookmarkMenu to top level.

I’ve replaced the link above with a link to the updated version.

Comments

Submitted by Steven Garrity on

Permalink

Very nice. It is worth noting that however wacky and ugly, the Firebird bookmarks.html format is consistent in Firebird across platforms (Windows, Linux, Mac) - so this would also allow you to get bookmarks from Safari to Firebird on Windows or Linux.

See Mozilla Firebird bugzilla bug #66116 for more on this problem with Firebird.

Submitted by Frances on

Permalink

Although I really had no idea what I was actually doing, I followed your instructions and it worked. I deleted the original bookmarks folder from the Phoenix proflle folder and replaced it with the one created with TestXSLT from Safari. But now I can’t get things to display on the toolbar. Is there any way to merge the old and new bookmark files?

Submitted by Gustave on

Permalink

Not sure what is going on here, but my Safari bookmarks file seems to be something other than plain text, but when i open it in plist editor, it works fine. No idea what is going on here…

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search