« Dijkstra's Beard | Main | Tick »
Sunday
Jun292008

Using Wget to Download a Web-Site

This evening I wanted to download the Blender Python API documentation onto my  laptop so I could refer to it when I am not connected to the web. I knew that I could use the Linux command line program Wget to do this but it took me quite a bit of experimenting to get the right options.  Initially I was just using the -r and -k options but Wget would go off and download pages from other web-sites.  Eventually I discovered the -L option which restricts download to pages that are linked relative to the initial page.  This did the job:

wget -rkL http://www.blender.org/documentation/245PythonDoc/frames.html

This left a directory structure named www.blender.org in my home directory and this structure contained correctly interlinked copies of the pages I needed. For more details on the Wget options see the Wget man page.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.