Skip to content

Instantly share code, notes, and snippets.

@chrisroos
Created September 9, 2011 12:08
Show Gist options
  • Save chrisroos/1206052 to your computer and use it in GitHub Desktop.
Save chrisroos/1206052 to your computer and use it in GitHub Desktop.
Using wget to create offline copies of Google API docs

I've used this in the past to grab offline copies of some of the Google API docs.

$ wget --no-parent --recursive --page-requisites --html-extension --convert-links "http://code.google.com/apis/gears/"

# --no-parent - Don't fetch anything in the parent directory of the URL specified
# --page-requisites - Download everything required for the page to display correctly
# --recursive - Recursively download (use default depth of 5)
# --html-extension - Add .html to downloaded html files (this isn't necessarily required for the google code example but might be useful on other sites)
# --convert-links - Update links in the downloaded document to point to, either the downloaded copy of a file or a full URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment