aboutsummaryrefslogtreecommitdiff
path: root/ffbookmarkexporter.py
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-13 22:23:47 -0500
committerB Stack <bgstack15@gmail.com>2020-12-13 22:26:15 -0500
commitd349db57519597a7d528c96d7db2d74116dae737 (patch)
treee9f6280dcf5cf7b24fec8f726bf68c441e96b9b2 /ffbookmarkexporter.py
downloadmbbmlib-d349db57519597a7d528c96d7db2d74116dae737.tar.gz
mbbmlib-d349db57519597a7d528c96d7db2d74116dae737.tar.bz2
mbbmlib-d349db57519597a7d528c96d7db2d74116dae737.zip
initial commit
Diffstat (limited to 'ffbookmarkexporter.py')
-rwxr-xr-xffbookmarkexporter.py13
1 files changed, 13 insertions, 0 deletions
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()
bgstack15