Sometimes it is useful to be able to download a set of pages from a website that more or less form a closure on linking.
There are tools for doing this in Firefox.
I wanted a tool that could handle retries easily (my Firefox tool can’t as far as I can tell), and could produce a set of webpages that I could transfer easily to my itouch.
wget does this quite easily.
An appropriate command-line is:
wget -r -k -np -p -nc “$1″
# -r recursive
# -k convert links for local viewing
# -np dont move into parent directory
# -p load page prerequisites (images etc)
# -nc dont download documents that are already there (could use -N to only download newer versions)
You can interrupt it, remove any partially-downloaded files, then run it again, and it will only download the files that haven’t been downloaded yet.
There are additional options available in wget to filter to specific names, directories, and so on.