Skip to content

Instantly share code, notes, and snippets.

@peterwwillis
Created March 10, 2019 17:56
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 peterwwillis/58fe5ae05a2c2879a89cbf11536f820f to your computer and use it in GitHub Desktop.
Save peterwwillis/58fe5ae05a2c2879a89cbf11536f820f to your computer and use it in GitHub Desktop.
#!/bin/sh
# Exports your bookmarks.html and converts them to a simple text file, one URL per line
BOOKMARKS_FILE="$1"
cat "$BOOKMARKS_FILE" | grep HREF | sed -e 's/^.*HREF="\([^"]*\)".*$/\1/ig' | grep -i ^http | sort -u > httrack-bookmarks.txt
# Get all bookmarks with httrack.
# NOTE: this disables all of httrack's "safety features"
httrack -O foo -i -iC2 -c20 -%c200 -%! -r1 -n -%k -%L httrack-bookmarks.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment