The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Export Firefox Bookmarks to Safari

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Premshree Pillai

Posts: 478
Nickname: premshree
Registered: Mar, 2004

Premshree Pillai is a Ruby evangelist, working with Yahoo!.
Export Firefox Bookmarks to Safari Posted: Mar 30, 2006 2:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Premshree Pillai.
Original Post: Export Firefox Bookmarks to Safari
Feed Title: Premshree's Personal Weblog
Feed URL: http://premshree.livejournal.com/data/rss
Feed Description: Premshree's Weblog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Premshree Pillai
Latest Posts From Premshree's Personal Weblog

Advertisement

Firefox on OS X sucks. Big time. I decided to move to Safari, but I couldn’t do that without exporting my bookmarks. Here’s how I did it:

The Firefox bookmarks is in an HTML file. It’s typically located at ~/Library/Application Support/Firefox/Profiles/<profile name>/bookmarks.html. Safari stores its bookmarks at ~/Library/Safari/Bookmarks.plist, which is a binary file.

Use this simple script to export your Firefox bookmarks as a readable XML, and follow these steps:

renegade:~ $ ruby ff2safari.rb  > ~/Library/Safari/Bookmarks.xml
renegade:~ $ cd ~/Library/Safari/
renegade:~/Library/Safari $ mv Bookmarks.plist Bookmarks.plist.backup
renegade:~/Library/Safari $ plutil -convert binary1 -o Bookmarks.plist Bookmarks.xml

Note that this script simply dumps all your Firefox bookmarks in Safari’s Bookmarks Bar. (I have a very few bookmarks on my browser, most of which are in the Bookmarks Toolbar.) You could use an XML parser to export bookmarks as is. To understand the format of the XML you need to generate, you might want to export the existing Safari Bookmarks file to XML:

renegade:~/Library/Safari $ plutil -convert xml1 -o readable.xml Bookmarks.plist

One interesting thing to note: a ktrace/kdump on Safari didn’t do any open on Bookmarks.plist. I wonder why.

This post brought to you from Safari.

Read: Export Firefox Bookmarks to Safari

Topic: Image Serving with WEBrick Previous Topic   Next Topic Topic: Celebrating One Year of Anarchaia

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use