Skip to content

Instantly share code, notes, and snippets.

@philsnow
Last active December 11, 2022 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philsnow/fad840c952615e41cb9e636e41426fe6 to your computer and use it in GitHub Desktop.
Save philsnow/fad840c952615e41cb9e636e41426fe6 to your computer and use it in GitHub Desktop.
getting tabs out of firefox
#!/bin/bash
# brew install lz4 && \
# mkdir -p ~/dev && \
# cd ~/dev && \
# git clone https://github.com/lilydjwg/mozlz4-tool && \
# cd mozlz4-tool && \
# LIBRARY_PATH=/opt/homebrew/lib cargo build --release
~/dev/mozlz4-tool/target/release/mozlz4-tool "$(find ~/Library/Application\ Support/Firefox/Profiles/ -name recovery.jsonlz4 | head -1)" | jq '["* \(.windows | length) Firefox windows as of '$(date +%Y-%m-%dT%H:%M:%S)'", (.windows | . as $windows | length as $num_windows | keys | .[] | $windows[.] as $window | [" - window \(. + 1) out of \($num_windows), \($window.tabs | length) tabs", ($window.tabs[] | .entries[-1] as $last | " - [[\($last.url)][\($last.title)]]")])] | flatten | .[]' -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment