aboutsummaryrefslogtreecommitdiff
path: root/export-firefox-bookmarks
blob: 83472118a3eabbe28a8db2fefb4a725fabc2c734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash
#
# Export Mozilla Firefox bookmarks.
# Based on https://github.com/pirate/ArchiveBox/blob/master/bin/export_browser_history.sh
#

# Base folder to work on
BASEDIR="$HOME/.mozilla"

# There might be many places.sqlite on many profiles
find $BASEDIR -name places.sqlite | while read file; do \
  sqlite3 $file "SELECT \"[\" || group_concat(json_object('timestamp', b.dateAdded, 'description', b.title, 'href', f.url)) || \"]\" FROM moz_bookmarks AS b JOIN moz_places AS f ON f.id = b.fk"
done