bugGNU Wget - Bugs: bug #36797, add post-download command hook


bug #36797: add post-download command hook

Submitted by:  Noël Köthe <nok>
Submitted on:  Thu 05 Jul 2012 10:52:21 PM UTC  
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: NoneOperating System: GNU/Linux
Reproducibility: NoneFixed Release: None
Planned Release: NoneRegression: None
Work Required: NonePatch Included: No

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 05 Jul 2012 10:52:21 PM UTC, original submission:


this is a forwarded feature request from http://bugs.debian.org/670615


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.


Thank you.

Noël Köthe <nok>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by nok (Submitted the item)
  • -unavailable- added by nok

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 05 Jul 2012 10:52:21 PM UTCnokCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1