I have a local HTML file referencing image and style data in various places in the local file system. I’d like to get a list of all referenced files; or alternatively a command that will copy the HTML files and all referenced files to some clear location (with or without changing the links in the HTML file), so that I can make a self-contained ZIP file of the HTML page.
It seems that wget provides good support for downloading an HTML file including all prerequisites (images, styles) using the --page-requisites
flag. Unfortunately it does not support file://
URL.
What are my options here?
wget
with a temporary web server likepython -m SimpleHTTPServer
, but that is shaky due to guessing a free port and killing the web server afterwards. – Joachim Breitner Sep 6 '13 at 9:30