Package: wget Version: 1.13.4-3 Severity: wishlist Hello,
It would be really great to have a post-download command hook which would be executed after each file is downloaded successfully by wget. Currently, when running from scripts it is not easy to do something with actually downloaded file if it is downloaded using recursion or if file is generated dynamically, or filename is unknown or redirection took place. for example wget --post-download=md5sum http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz md5sum will be then executed by wget, for example using system() command: system("wget bash-4.2.tar.gz") preferably with some additional environment variables set, like time of download, wheter it was first download or already downloaded file previously (but was running with -c flag), what was size, speed, original url, url after last redirection, wheter redirection took place, what was dns and IP address used and protocol (http/ftp, ipv4/ipv6, etc), average speed, number of retries, wheter html links was already changed to local or absolute ones from relative ones, received cookies/headers, etc. Actual system command will depend also on -O flag, -c, and whatever we are using -nc, -nd, -x, nH, --cut-dirs, (and so also -r) and -P. This command will be very useful in recursive processing as well when using glob patterns, as well in case of redirects. Instead of system() command, one can use fork/execve, which will not clobber environment variables, as well make files with spaces (both downloaded one as well used script) not a danger. Thanks, Witek -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 3.2.0-2-686-pae (SMP w/1 CPU core) Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages wget depends on: ii dpkg 1.16.2 ii install-info 4.13a.dfsg.1-10 ii libc6 2.13-30 ii libgcrypt11 1.5.0-3 ii libgnutls26 2.12.18-1 ii libgpg-error0 1.10-3 ii libidn11 1.24-2 ii zlib1g 1:1.2.6.dfsg-2 wget recommends no packages. wget suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

