Re: wget option (idea for recursive ftp/globbing)

2006-03-09 Thread Mauro Tortonesi
Tony Lewis wrote:
 Mauro Tortonesi wrote: 
 
i would like to read other users' opinion before deciding which
course of action to take, though.
 
 
 Other users have suggested adding a command line option for -a two or
 three times in the past:
 
 - 2002-11-24: Steve Friedl [EMAIL PROTECTED] submitted a patch
 - 2002-12-24: Maaged Mazyek [EMAIL PROTECTED] submitted a patch
 - 2005-05-09: B Wooster [EMAIL PROTECTED] asked if the fix was ever
 going to be implemented
 - 2005-08-19: Carl G. Ponder [EMAIL PROTECTED] asked if the patches
 were going to be applied
 - 2005-08-20: Hrvoje responded by posting his own patch for --list-options
 
 (and that's just what I can find in my local archive searching for list
 -a)
 
 There is clearly a need among the user community for a feature like this and
 lots of ideas about how to implement it. I'd say you should pick one and
 implement it.
 
 If you need copies of any of the patches mentioned in the list above, let me
 know.

I've just commited into the trunk a patch that finally adds support for
download of hidden files from FTP sites. The patch provides a new
implementation of ftp_list that tries the `LIST -a' command first
and in case of failure gracefully reverts to the good old `LIST'.

Since the patch does not add any new option and provides safe fallback
to previous default behavior, I think it is a good compromise that
implements a new feature without sacrificing maintenability or robustness.

-- 
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 Linuxhttp://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it


Re: wget option (idea for recursive ftp/globbing)

2006-03-02 Thread Mauro Tortonesi
MagicalTux wrote:
 Hello,
 
 I'm working a lot on website mirroring from various hosting companies,
 and I noticed that usually, hidden files aren't shown by default when
 LISTing a directory.
 This result in some files (.htaccess/.htpasswd) not being mirrored.
 
 I did an hugly hack for my personnal needs, and have a wget-all binary
 which sends LIST -a instead of LIST, but it would be nice to have a
 new option to wget, like --ftp-list-options (or whatever).
 
 By default, the same old behaviour would be used, but when passing
 --ftp-list-options=-a it would result in having the -a option passed to
 LIST. This option is not supported by all FTP servers, but most of those
 used nowadays accept it, and usually require it to display hidden
 files.
 
 I had a look at the wget sourcecode, but I don't know it enought to
 write a patch for that, and I don't either have the time to check for
 the way to add a new option to wget.
 
 By the way this option should also alter globbing's LIST, making it
 possible to run something like wget 'ftp://server.tld/path/to/.ht*'

your --ftp-list-options proposal is actually very interesting, although
perhaps a little bit too low-level. we were thinking about changing
wget's default behavior by trying LIST -la before LIST when downloading
from an ftp site. however, i don't like the approach of hardcoding the
-la option in wget, so i personally prefer your proposal.

i would like to read other users' opinion before deciding which course
of action to take, though.

-- 
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 Linuxhttp://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it


RE: wget option (idea for recursive ftp/globbing)

2006-03-02 Thread Tony Lewis
Mauro Tortonesi wrote: 

 i would like to read other users' opinion before deciding which
 course of action to take, though.

Other users have suggested adding a command line option for -a two or
three times in the past:

- 2002-11-24: Steve Friedl [EMAIL PROTECTED] submitted a patch
- 2002-12-24: Maaged Mazyek [EMAIL PROTECTED] submitted a patch
- 2005-05-09: B Wooster [EMAIL PROTECTED] asked if the fix was ever
going to be implemented
- 2005-08-19: Carl G. Ponder [EMAIL PROTECTED] asked if the patches
were going to be applied
- 2005-08-20: Hrvoje responded by posting his own patch for --list-options

(and that's just what I can find in my local archive searching for list
-a)

There is clearly a need among the user community for a feature like this and
lots of ideas about how to implement it. I'd say you should pick one and
implement it.

If you need copies of any of the patches mentioned in the list above, let me
know.

Tony