bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] New option: --rename-output: modify output filena


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] [PATCH] New option: --rename-output: modify output filename with perl
Date: Wed, 31 Jul 2013 14:26:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi Andrew,

Andrew Cady <address@hidden> writes:

> This patch adds an option that allows the user to modify wget's output
> filenames using a perl expression.  It works similarly to perl's
> "rename" script, in terms of how perl is used to modify the filename
> string.  That is, the original filename is stored in the perl variable
> $_, which the user-supplied code can modify; the value left in $_ is
> used instead of the original.

As Tim, I really like this idea, it would be nice to have it in wget.

Thanks to have worked on it.


> This patch is not 100% "done":
>
>   * It includes "/usr/include/unistd.h" instead of <unistd.h>.
>   Otherwise I get compiler warnings about implicitly defined functions.
>   I guess the -I flags need to be changed when make calls gcc
>   perlfilter.c?  Please advise.

does it happen if you use "wget.h" as first include in the .c file?


>   * It should be possible to override the program used to filter the
>   names (arguably, the default should be sed rather than perl, although
>   I don't think so).

this seems to be the most important part to define now, it should be
generic enough to not depend from Perl.

What do you think about the "git filter-branch" syntax?  The difference
is that we will use the process stdout to retrieve the destination
filename.

Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]