Please see below ...

On 22/02/2019 12:25, MacFH - C E Macfarlane wrote:
Please see below ...

On 21/02/2019 22:35, David Cantrell wrote:
On 2019-02-21 20:38, MacFH - C E Macfarlane wrote:

Currently, if you specify an --exclude option on the command line, it overwrites any exclusions permanently specified in the options file. Would it not make more sense that any exclusions specified on the command line are *added* to those in the options file?

A common idiom in other tools is to have something like:

--exclude blah     # exclude blah and *only* blah
--exclude +blah    # exclude blah in addition to anything else already excluded

Certainly, that would be ideal in giving us the best of both worlds.

However, there is a problem, perhaps two, with that particular syntax in GiP.  The first is that the exclude option is a Regular Expression, so the + sign has a special meaning, and gives an RE error when used as above.  The possible second is that on Windows machines + is a parameter separator for some commands, for example COPY.  So we'd need a similar syntax, but using a different prefix symbol.  A tilde ~ might be a good choice for this, as, AFAIK, it is inert in most operating systems; that is to say, I'm not aware of any special meaning attached to it within command lines.

As for actual perl code to merge the options, the merge itself is very easy to do  -  my gip.pl script that I've linked before does it when merging two option files from two different PCs.  I suspect the major difficulty, at least for me not knowing my way around the get_iplayer.pl script, is ensuring that the command-line is parsed appropriately and the parameter, including the special prefix character, is passed intact to the section of code that deals with exclusions.

There are probably other parameters where such a syntax would be useful.


_______________________________________________
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer

Reply via email to