33
4
The -k
option (or --convert-link
) will convert links in your web pages to relative after the download finishes, such as the man page says:
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.
So, if I didn't specify -k
, can I run wget
again after the download and fix that, and if so, what would be the proper command? My guess is wget -c [previous options used] [url]
and run it in the same working directory as the file were downloaded to.
1you could certainly post-process the files after download, but i don't know if
wget
does this. your idea of trying it with-c
is a good one. time to experiment! – quack quixote – 2009-12-07T21:08:31.177Have a utility handy to convert the links, by any chance? Running on Windows, by the way... – Nathaniel – 2009-12-07T21:14:49.963
perl
... no prewritten script, but if i wanted a DIY solution that's what i'd use – quack quixote – 2009-12-07T21:48:57.337Okay, thanks. Don't have Perl installed and it would take too long to grab it. Fortunately, I found how to make wget do the job. I posted an answer. – Nathaniel – 2009-12-07T21:52:25.817
btw, ActivePerl is around as a windows perl port; it's a fairly small installer, and i'm pretty sure most CPAN modules work with it. http://www.activestate.com/activeperl/
– quack quixote – 2009-12-08T15:47:21.223