Hacker News new | ask | show | jobs
by voyou 4166 days ago
You can get pretty close to this, I think with:

    wget --mirror --convert-links http://site.example.com/
From the wget manual:

    --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.

           The links to files that have been downloaded by Wget will be
           changed to refer to the file they point to as a relative link.

           Example: if the downloaded file /foo/doc.html links to
           /bar/img.gif, also downloaded, then the link in doc.html will
           be modified to point to ../bar/img.gif.  This kind of
           transformation works reliably for arbitrary combinations of
           directories.