Skip to content

Instantly share code, notes, and snippets.

@nicerobot
Last active August 26, 2021 01:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicerobot/ad46cf894f527f2f35f71084836b02f8 to your computer and use it in GitHub Desktop.
Save nicerobot/ad46cf894f527f2f35f71084836b02f8 to your computer and use it in GitHub Desktop.
Open URLs based on contents of a Chrome bookmarks-folder
#!/bin/bash
folder="${1:-open}"
profile="${2:-Default}"
jq -r \
'.roots.bookmark_bar.children[] | select(.name == "'"${folder}"'") .children[].url' \
"${HOME}/Library/Application Support/Google/Chrome/${profile}/Bookmarks" \
| while read url; do
open "${url}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment