Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to save web pages for offline reading. Currently I save it using firefox. For bulk saving I want to automate the process using a script (or what about a web site copier like webhttrack?). From terminal I can save the .html file of the URL (using wget URL) but can't view the page as no image, .js, etc.

Sometimes I want to save numbered pages, ie. http://askubuntu.com/posts/1, http://askubuntu.com/posts/2, http://askubuntu.com/posts/3, http://askubuntu.com/posts/4 .. (like mirroring) in one shot.

How can I bulk save web pages with all necessary file to view it properly?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

There's a great little firefox addon called ScrapBook that'll do what you want. Just install it by clicking the Add to Firefox button on the addon's website over at Mozilla.

Here's the link

share|improve this answer
    
Can I change the file name of saved page to the tile of web page from YY:MM:DD ? –  totti Apr 10 '13 at 6:41
    
What abt bulk saving ? –  totti Apr 10 '13 at 6:57

You should use wget, but read the manual for the actual options you need.

Pay special attention to options like

‘-p’
‘--page-requisites’
This option causes Wget to download all the files that are necessary to properly display a given html page. This includes such things as inlined images, sounds, and referenced stylesheets.

or even

‘-m’
‘--mirror’
Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps ftp directory listings. It is currently > equivalent to ‘-r -N -l inf --no-remove-listing’.

Hell, check out, if you feel like it,

‘-k’
‘--convert-links’
After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-html content, etc.

resulting in something like:

wget --mirror -p --convert-links -P ./LOCAL_PATH WWW.WEBSITE.TLD/PATH
share|improve this answer
    
Not helping, am I? Well, suit yourself then. Be sure to take a look at the documentation (I know right? reading) and search for "external". Play around with the -r and -l options. And please mention what you tried in your question instead of in snarky comments. –  Nanne Apr 10 '13 at 8:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.