From d349db57519597a7d528c96d7db2d74116dae737 Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 13 Dec 2020 22:23:47 -0500 Subject: initial commit --- ffbookmarkexporter.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 ffbookmarkexporter.py (limited to 'ffbookmarkexporter.py') diff --git a/ffbookmarkexporter.py b/ffbookmarkexporter.py new file mode 100755 index 0000000..5881638 --- /dev/null +++ b/ffbookmarkexporter.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +# This is more of a demo script than a useful thing on its own. + +import mbbmlib + +# Export a mozilla profile's bookmarks to html with favicons +mbbmlib.export_bookmarks_to_html("/home/bgstack15/.mozilla/firefox/12345678.default", "/mnt/public/Public/bookmarks.html", debuglev=8, fetch_icons=True) + +# Get a nested list of bookmarks from that profile. The only additional use it has right now is to pretty-print which is worse than the html. +bm = mbbmlib.Bookmark("root") # bootstrap bookmark object +bm.load_from_places("places.sqlite", limit=2000, fetch_icons=False, iconsize=32, debuglev=8) +bm = bm.unflatten() +bm.pretty_print() -- cgit