Re: [Libiptcdata-devel] Multiple same tags behavior...
Brought to you by:
dmoore
|
From: David M. <dc...@MI...> - 2005-09-14 22:58:28
|
Right now, the expected behavior when there is more than one tag of the same type is that iptc will operate on the first one. Note that this is a limitation of only the command-line utility and not the full libiptcdata library. Naturally, this is less than ideal -- I was mostly waiting for someone to notice the omission before implementing it. And you just noticed! So now the question is, what is the ideal interface to make iptc work with multiple tags of the same type? One possibility with the '-p' option is to just print all matching tags. However, I don't like this solution because it makes it difficult to write shell scripts that run unattended. Such a script might think that all the printed data is actually part of just one tag, when it really came from several. Here's my proposed solution: - Expand the syntax of the tag identifier. Thus, instead of saying '-p Keywords', you would say '-p Keywords:2' to print the 2nd keyword. If you omitted the ':2', it would just print the first (the current behavior). - You could also specify a wildcard, as in '-p Keywords:*' to indicate that the command should be repeated for all tags of that type. So with the '-p' command, every tag of that name would be printed; with the '-d' command, every tag of that name would be deleted; and with the '-m' command, every tag of that name would be modified. Does this sound acceptable? If so, I'll implement it. -David On Wed, 2005-09-14 at 23:00 +0200, S=E9bastien Maerten wrote: > Good evening, >=20 > Maybe I'm missing something, but what is the expected behavior of the =20 > iptc tool, in case of multiple "identical" tags ? > It seems to me that iptc should return a list of tags whose "name" =20 > are the same, in case they are several, but this seems not to be the =20 > case here :( (using your latest unreleased version). > If my thoughts sounds good to you, I'd be more than happy to have a =20 > way to fix this, since I need to get the value of multiple "Keywords" =20 > tags RSN. >=20 > Thank you for you patience.=20 |