Hi,

Since i'm not subscribed, please CC me the reply/replies.

Currently I have the following problem: I want to store a html page and its
prerequisites locally. The default name under which the html page is stored is
for example "index.php?query+string=foo.html", which IMHO is an ugly filename.

Therefore I use -O to write to a more sensible name. This also facilitates -k,
which converts links such as:
"http://site.org/index.php?query+string=foo#section";

to the local target: "document.html#section"

I also use -nd, so no directory structure is created, and -nc to avoid 
clobbering.

However, when I use -p to get the prerequisites in combination with -O, several
prerequisites are saved under the same name specified in -O, overwriting
eachother. When I don't use -O, the html file downloaded can't be renamed to a
sensible name because internally the converted links point to the old, ugly name: "index.php?query+string=foo.html#section"

So to summarize: the problem is I can't combine -O, -p and -k in a meaningful
way to do all this at once:

* save a document to a sensible name, which wget consecutively automatically
  uses for link conversion
* save the prerequisites (unless they've been stored in the same directory
  before)
* convert both links to prerequisites and links to id sections to local.

I could use sed -i or perl -pi -e to patch the html to do the conversion myself,
but IMO this is a suboptimal solution, because wget will be better at this and
therefore less prone to errors.

Any ideas?

Regards,
Michiel de Boer

Reply via email to