Skip to content

Instantly share code, notes, and snippets.

@sleepiecappy
Forked from seven1m/download_hex_docs.sh
Created September 18, 2016 18:50
Show Gist options
  • Save sleepiecappy/b689147669cd2fe1a29eedc7a80c5b6b to your computer and use it in GitHub Desktop.
Save sleepiecappy/b689147669cd2fe1a29eedc7a80c5b6b to your computer and use it in GitHub Desktop.
Download the docs for a project from hexdocs.pm
#!/bin/bash
project=$1
wget --mirror -k -np http://hexdocs.pm/$project
ruby -e "puts ARGF.read.scan(/[A-Z]\\w*\\.[\\w\\.]+/).uniq.map { |l| 'http://hexdocs.pm/$project/' + l + '.html' }" hexdocs.pm/$project/dist/sidebar_items.js | wget --mirror -k -i -
wget --mirror -k http://hexdocs.pm/$project/extra-api-reference.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment