Merge branch 'master' into 'export-firefox-bookmarksbackup'

# Conflicts:
#   export-firefox-tabs.sh
This commit is contained in:
Suzanne Soy 2020-10-10 01:36:05 +00:00
commit cbd1d384ff
2 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,16 @@
#!/bin/bash
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p dejsonlz4 jq bash -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fea633695211167753ee732c9087808d0c57461c.tar.gz
jq '.roots[] | recurse(.children?[]?) | "\( .name? ): \( .url? )"' ~suzanne/apps/chromium/.config/chromium/Default/Bookmarks
# Usage: ./export-firefox-bookmarks.sh [path/to/.mozilla/firefox/XXXXXXXX.profile]
set -euET -o pipefail
if test $# -ge 1; then
profile="$1"
else
# use printf to avoid echo's ambiguity; save trailing whitespace with a dummy x (not needed here as the string ends with "Default", but a good habit nevertheless)
profile="$(printf "%sx" ~/.config/chromium/Default/)"
profile="${profile%x}"
fi
jq '.roots[] | recurse(.children?[]?) | "\( .name? ): \( .url? )"' < "$profile"/Bookmarks

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -euET -o pipefail
echo "This is just an example, best not to depend on the user having the panorama plug-in installed."
exit 1.
dejsonlz4 ~suzanne/apps/chromium/.mozilla/firefox/*.default/sessionstore-backups/recovery.jsonlz4 | jq '.windows[0].tabs[]|.extData["extension:panorama-tab-groups@example.com:thumbnail"]' -r | jq '.thumbnail'