Assign two tags at once

Started by msdobrescu, March 20, 2013, 08:07:40 AM

Previous topic - Next topic

msdobrescu

Hello,

Is there a way to assign two tags at once?

like: -Xmp:Subject=Iptc:Keywords=...

Thank you.

Phil Harvey

To maintain synchronization between XMP and IPTC, take a look at the MWG tags.

Or to assign the same value to any number of arbitrary tags, you can create a shortcut in the config file and assign a value to the shortcut tag.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

msdobrescu

OK, but what if I have different workflows?
Let's say I need to group tag A with B in 50% of daily work, and A with C in the other 50%?
Isn't it easier to have these A=B=... constructs? ...for the users, of course.

Phil Harvey

This can't be implemented as suggested because the argument syntax "-TAG1=TAG2=VALUE" is not compatible with the existing behaviour which would be to assign the value "TAG2=VALUE" to TAG1.

In your scheme, how would I assign the value "XXXX=YYYY" to a tag?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

msdobrescu

I don't know the implementation details, it's just a theory.
Some articles say that Perl could do that, so it could be used as (tag1, tag2) = ..., if I understood well.
The tool is in Perl, after all, and many things could be done using Perl syntax, isn't it?
I'm totally new to Perl, so I can't propose a real solution.
Any syntax that would simplify the usage is welcome.
It's just an idea.

Phil Harvey

It isn't the Perl implementation I'm worried about -- that is easy.

It is the command-line interface.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

msdobrescu

I think that's your, I must say, *GREAT* work, so you decide how it is natural to do it from the usability point of view.
I'm too new to it to give a reasonable specification.

Phil Harvey

Unfortunately I can see no way of doing this without introducing a new operator.  This would make an already confusing interface even more confusing, which I would rather avoid.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

msdobrescu

Well, it worths if I could avoid making config files...
Comparing to that, it's much easier for me.

Phil Harvey

Or you could just do this:

exiftool -TAG1=VALUE -TAG2=VALUE FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

msdobrescu

Of course, if I could avoid maximum length of the command line, which is 8k on the Windows 7.
Just maintainability could be an issue, where I have to care of, let's say, 50 kw twice, or same regex expression and so on.
I know, I could set them once and copy them, meaning doing several times (hopefully only twice) the files processing.
This means multiplying the processing time by 2 at least.

If there is no big deal to implement, better have some option not so often used by some, if it looks scary to them, than none.
I guess it is not easy also...

Phil Harvey

There is the -@ option if command length is a concern.

Or the -TAG<=FILE syntax if your tag values are very large.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).