4 ms·
I actually had to do this yesterday for a small fuzzy search through bookmarks thing I’m building for myself. It was something like: SELECT url FROM moz_p
by alin23 4y ago
I actually had to do this yesterday for a small fuzzy search through bookmarks thing I’m building for myself.
It was something like:
SELECT url FROM moz_places WHERE id IN (SELECT fk FROM moz_bookmarks)
You can find more info on that database here: https://wiki.mozilla.org/Places/Places_SQL_queries_best_practices https://wiki.mozilla.org/Places/Places_SQL_queries_best_prac...
- mg 4y agoThat only gives you the urls though. You lose the names, the folder structure, the order and the keywords. The HTML format FireFox can create is so nice, that for now I am willing to manually book them up to get that. Until someone can come up with a way to automate it.
- alin23 4y agoYou can get names, folder, and ordered by date added in a nice JSON format: sqlite3 -json /tmp/places.sqlite '\ SELECT p.url, b.title, (SELECT f.title FROM moz_bookmarks f WHERE fk IS NULL AND f.id=b.parent) AS folder \ FROM moz_places p \ INNER JOIN moz_bookmarks b ON b.fk=p.id \ ORDER BY b."dateAdded"' The full folder structure might be a bit more complex to get, I only have them on the top level and can’t experiment. Not sure what the keywords, never used such a thing. I only rely on the title, and I’ll extract the text content of the link for a full text search through it because usually I’ll remember something from the contents and will try to search that instead of something from the title. I can’t predict what I’ll remember.