Last active
September 2, 2017 16:11
-
-
Save guyhughes/57ae5bdae1383b2ce147eea1205582c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brave bookmarks extraction is currently broken so this is how to dump them | |
# into a stream of json objects, then rewrite that into markdown. You can transform the | |
# markdown into html with pandoc or whatever. | |
# requires jq and sed | |
<session-store-1 jq ' .sites | to_entries[] | select(((.value.tags | length > 0) and ([.value.tags[] == "bookmark"] | any ) ) ) | { (.value.title): .value.location } ' > ~/brave-bookmarks.json | |
sed -r -e '/^[{}]$/d' -e 's/\s*"([^"]*)":\s*"([^"]*)"/[\1](\2)/' ~/brave-bookmarks.json > ~/brave-bookmarks.md |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment