Skip to content

Instantly share code, notes, and snippets.

@smarteist
Last active May 13, 2026 18:12
Show Gist options
  • Select an option

  • Save smarteist/a9bca26b66fc04b5a888a995fce5d8ec to your computer and use it in GitHub Desktop.

Select an option

Save smarteist/a9bca26b66fc04b5a888a995fce5d8ec to your computer and use it in GitHub Desktop.
Bash Script for Web Downloading
#!/bin/bash
# Mirror specific paths (Docs and Assets) into a local 'offline_docs' directory
httrack \
"https://www.openproject.org/docs/" \
-O "./offline_docs" \
"-*" \
"+*.openproject.org/docs/*" \
"+*.openproject.org/assets/*"
# Download only PDF files found within the docs into a 'pdf_files' directory
httrack \
"https://www.openproject.org/docs/" \
-O "./pdf_files" \
"-*" \
"+*.pdf"
# Mirror the entire docs site completely for offline browsing
httrack \
"https://www.openproject.org/docs/" \
-O "./full_mirror"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment