7

I regularly use three different computers. I keep a lot of data between them in sync using git. This works very well for most purposes.

My only problem is browser bookmarks. Firefox now keeps them in some sort of sqlite database. I could put this into git, but operations like merging then become worthless.

I have looked at a lot of bookmark sync extensions. Currently I use Xmarks, which is the best one, but even it is annoying in some ways. (For instance it now insists on having me log in every time I start up the browser.)

Online bookmarks suffer from various flaws, foremost that the user interface for them typically is terrible compared to the one built in to browsers.

Are there any good ideas for seamless ways to get bookmarks into version control like git? This would be so much simpler if Firefox just kept the bookmarks in a plain text or HTML file rather than in sqlite. So far I can only think of two solutions. One, dump Firefox for another browser. Unfortunately Chromium likely won't be much help as I think it uses a database too. There is uzbl, which would certainly keep bookmarks as plain text, but I would rather not go that route if I can help it as it's a lot of work to get uzbl working. Two, just keep bookmarks in my own plain text file that I can edit with vim. I could do a simple tagging system using awk. This doesn't get me much of a user interface, but this is really the best idea I can come up with so far.

2
  • 2
    I use Chrome and YAGBE and find that it's fine. I think you're making this pretty complex just to avoid an online bookmark storage tool.
    – jcollum
    Commented Feb 18, 2011 at 2:10
  • Updated my answer due to just noticing another possibility.
    – JAB
    Commented May 26, 2011 at 17:31

3 Answers 3

2

Two options available within Firefox itself:

Go to (in versions < 4) Bookmarks>Organize Bookmarks or (in 4+) Bookmarks>Show All Bookmarks. There will be a button-dropdown for backing up/restoring/importing bookmarks near the top of the dialog box that appears. There will be options to export your bookmarks as either a JSON file or an HTML file. Restoring from the JSON file will completely replace the current bookmarks, while importing the HTML file will just add all the bookmarks to the Bookmarks menu.

I think the HTML version might be better for merging bookmark files, but would require you to delete all the current bookmarks in Firefox before importing the most recent HTML file to avoid all the duplication that would occur. The JSON version does not have that problem, but I'm not sure how well-suited it would be to merging, as it doesn't use line beaks.

UPDATE:

Just noticed that Firefox 4, at least, offers the option to sync bookmarks, etc. Go to Tools>Options and select the "Sync" tab.

1

I think the most straightforward way to do this would be to dump the bookmarks from the Sqlite database into a CSV file, then check that into your DVCS. From the

This link on Sqlite.org should get you started on CSV from Sqlite.

There's nothing stopping you from putting the Sqlite db into version control -- you just won't have any compare history as (I think) Sqlite is storing stuff in binary. I'm not seeing the upside of having compare history on a set of bookmarks. It'll probably be a large file but this seems like the path of least resistance.

0

Perhaps there is a way to ‘replicate’/‘sync’ SQLite3 databases, perhaps run periodically using a scheduling tool such as cron/systemd (or the macOS / Windows equivalent).

This method, if feasible, should also allow for syncing between different brands of web browser, as well as providing a foundation for native desktop or mobile apps for bookmark analysis and management.

Once the above has been achieved, it would be almost trivial to change from syncing directly between SQLite3 instances to syncing between SQLite3 databases and a central temporal DBMS - that would provide the history / version control functionality and allow one to view how their bookmarks have changed over time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .