Hrvoje Niksic wrote:
Mauro Tortonesi <[EMAIL PROTECTED]> writes:


the following patch (just commited into the trunk) should solve the
problem.


I don't think that patch is such a good idea.

-O, as currently implemented, is simply a way to specify redirection.
You can think of it as analogous to "command > file" in the shell.  In
that light, leaving empty files makes perfect sense (that's what shell
does with "nosuchcommand > foo").

Most people, on the other hand, expect -O to simply change the
destination file name of the current download (and fail to even
consider what should happen when multiple URLs are submitted to Wget).
For them, the current behavior doesn't make sense.

Until -O is changed to really just change the destination file name, I
believe the current behavior should be retained.

you might be actually right. the real problem here is that the semantics of -O are too generic and not well-defined. as you say, we should split the redirection and output filename functions in two different commands.

in this case, the redirection command would simply write all the downloaded data to the output without performing any trasformation. on the other hand, the output filename command could perform more complex operations, like saving downloaded resources in a temporary file, parsing them for new URLs (maybe also providing a programming hook for external parsers) and writing the resources to their destination, archiving them in a well defined format in case of multiple downloads.

what do you think?

--
Aequam memento rebus in arduis servare mentem...

Mauro Tortonesi                          http://www.tortonesi.com

University of Ferrara - Dept. of Eng.    http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool  http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linux            http://www.deepspace6.net
Ferrara Linux User Group                 http://www.ferrara.linux.it

Reply via email to