Firefox sync limits
Firefox on mobile seems to have a hard limit on the number of URLs it will sync. So, I have to dedupe and test my thousands of bookmarks somehow. A previous Check Links plugin has stopped working, and with the move to WebExtensions probably won’t be updated again. Nothing else in the add-ons store seems to meet the bill so I am going to have write some code. Makes a welcome change from the day job….
Sync docs seem a little behind the times too.
Thought I’d tackle it by exporting and manipulating the bookmark files as json and then re-importing, but the data is a bunch of nested children, immutable, and not all are bookmarks. After some coding it all starts to get a bit messy. Surely there is an easier way? Eh, probably: For a hint at accessing Firefox sqlite database see [http://myexps.blogspot.ie/search/label/Firefox] and for the sqlite bookmark schema see [https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Database].
The schema keeps changing it seems, and “tags” don’t seem to be in the tables any more (even tho they still exist) . I seem to have lots of triplicate entries in moz_bookmarks too. And Sqllite doesnt support sensitive type or concurrent connection types, so it looks like a case of going through each entry in moz_bookmarks (17000 odd), checking/pinging each URL, recording the id of each fail and then using a preparedStatement to delete these rows. Better make a backup first!
Code on Github at https://github.com/uoccou/firefoxbookmarks. Depends on another project alink-utils (with Mockito, Powermock tests). Tests for bookmark checker are a WIP for now, as is documentation.