-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gerard wrote:
>> On December 09, 2007 at 07:03PM Stuart Moore wrote:
> 
>> Could the exit code used be determined by a flag? E.g. by default it
>> uses unix convention, 0 for any success; with an
>> --extended_error_codes flag or similar then it uses extra error codes
>> depending on the type of success (but for sanity uses the same codes
>> for failure with or without the flag)
>>
>> That should allow both of you to use it for scripting.
> 
> Curl has a "-w" option that takes several different variables. I presently use
> the 'http_code' and 'size_download' variables to gather information I need to
> determine what exactly transpired. They are also great for debugging a script;
> however, that is another matter. Presently, I direct this info to a file and
> then grep the file to gather the information I need. It works faster than
> doing multiple file comparisons, especially when the files are compressed.
> 
> If wget were to implement something along this line, possibly even setting a
> specific variable indicating whether or not a file was downloaded, it would
> make scripting a lot easier and less prone to breakage.

This is the sort of thing I think I was talking about when I referred to
a "mapping" file. I was also thinking it might not hurt to have a minor
tool to aid in reading information back out from such a file, to avoid
having everyone "reinvent the wheel" scores of times to do the same
thing, if nothing else.

The concept also ties in rather well with the "Wget 2.0" concept of
having a "metadatabase", containing information about mappings between
original URLs and local filenames, MIME types, portions downloaded, etc.

And, I still like this idea better than having an option to switch
between "exit status" modes.

> Curl presently has one of the best exit code implementations available.
> Studying their model would seem like a worth while venture.

Will do.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHXTZl7M8hyUobTrERAq3mAJ0Q9k2s8VGitMjrub6t1kpYyWwtVACgjChR
NCZpEEj4k0uNJPwee0dGvzY=
=nTih
-----END PGP SIGNATURE-----

Reply via email to