Use a Metadata Template to create a Nested Keyword?

Started by fincire, December 05, 2018, 03:56:41 PM

Previous topic - Next topic

fincire

Hello,

Is it possible to use a metadata template to create a keyword on a lower level than the root of the @Keywords hierarchy?

I have lots of images with model names listed in the Person In Image tag -- {File.MD.XMP::iptcExt\PersonInImage\PersonInImage\0}

My Keyword hierarchy is like this:

@KEYWORDS
|---[WHO]
     |---Name
          |---<model names>

And I've created a Metadata Template (see attached image) where the tag XMP::Lightroom\HierarchicalSubject draws its data from {File.MD.XMP::iptcExt\PersonInImage\PersonInImage\0}.

When I run the template, it creates the keyword, but (obviously) puts it at the root of the keyword tree, rather than in my nested WHO|Name| structure:

@KEYWORDS
|---<model name drawn from Person In Image tag>
|---[WHO]
     |---Name
          |---<model names>

Is there a way to tell the template to create the new keyword inside WHO|Name?

Thank you!

Mario

PersonInImage is a repeatable field, it can specify multiple persons.
Your template takes whatever text your variable produces and fills the target tag with the result.
If you deal only with a single element in your PersoninImage tag, you can just use the variable like this:

WHO|Name|{Variable}

For a variable with the value "Mickey" the resulting text is WHO|Name|Mickey and this is then written as a hierarchical keyword.


Note: This solution does not work if your variable holds multiple elements, separated by a semicolon (ExifTool's way to produce list elements when flattening).
If your PersonInImage take contains Mickey;Donald, the resulting keywords would be

WHAT|Name|Mickey
Donald

There is no variable function which splits the variable and then re-combines it with an individual prefix (like WHO|Name).


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

fincire

Worked perfectly. Thank you Mario!

I guess I didn't realize the "Fill the Tag from this Data" field could impact the tags in that way.

Mario

Metadata Templates in IMatch are a lot more flexible than what you might know from other applications  ;)
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook