diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-08-20 20:44:34 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-08-20 20:44:34 -0300 |
commit | e851401694daacaf1aba2c87ed557e5dbf00af02 (patch) | |
tree | d772b15f3a5ba9e015936f7162f448a7208a4001 /export-firefox-bookmarks | |
parent | d6a4d78d31ffa57e00a7d5b0a87baa38156cee06 (diff) | |
download | scripts-e851401694daacaf1aba2c87ed557e5dbf00af02.tar.gz scripts-e851401694daacaf1aba2c87ed557e5dbf00af02.tar.bz2 |
Move scripts to other repositories
Diffstat (limited to 'export-firefox-bookmarks')
-rwxr-xr-x | export-firefox-bookmarks | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/export-firefox-bookmarks b/export-firefox-bookmarks deleted file mode 100755 index 45878dd..0000000 --- a/export-firefox-bookmarks +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# -# Export Mozilla Firefox bookmarks. -# Based on https://github.com/pirate/ArchiveBox/blob/master/bin/export_browser_history.sh -# - -# Parameters -BASENAME="`basename $0`" -BASEDIR="$HOME/.mozilla/firefox" -PROFILES="$BASEDIR/profiles" -PROFILE="$1" -#SECTION="moz_${2:-bookmarks}" - -# Export from a single database -function export_firefox_bookmark { - sqlite3 $1 "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" -} - -# Check -#if [ ! -e "$BASEDIR/profiles.ini" ]; then -# echo "$BASENAME: not found: $BASEDIR/profiles.ini" -# exit 1 -#fi - -#PROFILES="grep "^Name=" $BASEDIR/profiles.ini | cut -d = -f 2 | xargs" - -# There might be many places.sqlite on many profiles -if [ -z "$PROFILE" ]; then - find $BASEDIR -name places.sqlite | while read file; do \ - export_firefox_bookmark $file - done -else - # Assumption: when a $PROFILE is given, search at $PROFILES - if [ -e "$PROFILES/$PROFILE/places.sqlite" ]; then - export_firefox_bookmark $PROFILES/$PROFILE/places.sqlite - else - echo "$BASENAME: file not found: $PROFILES/$PROFILE/places.sqlite" - exit 1 - fi -fi |