bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Relative links / destination target


From: Michael
Subject: [Bug-wget] Relative links / destination target
Date: Fri, 28 Jul 2017 15:18:02 +0300

Hello there,

To create static html file, I use the following script:
echo wget 3d-print-master site to html.
wget --mirror -p --page-requisites --html-extension --adjust-extension
--convert-links -e robots=off -P . http://3d-print-master.com/

destintation="http://somewhere.com";
destintation=""
find 3d-print-master -name "*.html" -exec sed -i -r -e
"s%https?:[\\]?/[\\]?/3d-print-master.com/%$destination%g" {} +

The generated html files contains reference to the original site. I want to
convert the links to relative link so the site can be seen from local disk
for example, or 
to create new links to the target location.

I suggest to have a flag like -destination http://www.somewhere.com 
If it is not specified, the links will become relative.

What do you think?

How can I implement it in wget code? Can I call system("find 3d-print-master
-name \"*.html\" -exec sed -i -r -e
\"s%https?:[\\]?/[\\]?/3d-print-master.com/%$destination%g\" {} +
"); for that?

Michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]