Firefox 3 uses sqlite to store bookmarks (and most other things)

Posted by phillip Wed, 23 Apr 2008 16:03:00 GMT

ever wanted to search your bookmarks with

SELECT * FROM moz_bookmarks WHERE title LIKE "%ruby%";

now you can:

in your firefox profile directory (~/Library/Application Support/Firefox/Profiles/xxxx.default on a Mac), type:

# open db file
$ sqlite3 places.sqlite

# show available tables
sqlite> .tables

# set output to sql insert statements
sqlite> .mode insert

# send output to file "firefox_bookmarks" 
sqlite> .output firefox_bookmarks

sqlite> SELECT * FROM moz_bookmarks WHERE title LIKE "%ruby%";

# list other available commands & options
sqlite> .help

Or, if you want JSON output you can export all bookmarks via the GUI. Use Bookmarks > Organize Bookmarks, click the rightmost icon in the top navigation and choose Export.

Posted in ,  | Tags , , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://me.phillipoertel.com/trackbacks?article_id=firefox-3-uses-sqlite-to-store-bookmarks&day=23&month=04&year=2008

(leave url/email »)

   Comment Markup Help Preview comment