photools.com Community

IMatch Discussion Boards => FAQ, Workflow, Tutorials, Tips & Tricks => Metadata => Topic started by: Mees Dekker on January 28, 2021, 02:02:08 PM

Title: Categories to keywords
Post by: Mees Dekker on January 28, 2021, 02:02:08 PM
I basically use categories for my workflow. However, I have a number of files (each of them is assigned to multiple, but various, categories) that have to delivered with keywords written to the file. Is there an easy way to copy the assigned catageories to keywords and write these keywords in to the file?

On this forum I found a very old topic related to transforming/copying categories into keywords. https://www.photools.com/community/index.php?topic=3428.msg22482#msg22482

However: the metadata template to do this, was removed by admin. Could anybody point me in right direction (or has a metadata template available)?

Title: Re: Categories to keywords
Post by: Jingo on January 28, 2021, 03:21:30 PM
Hi Mees - these threads should help you along in building a category to keyword metadata template... should be as easy as choosing the category you want and then pointing it to the appropriate XMP::keywords tag you wish to populate.  Of course, there are lots of things that can also be done with variables, etc .... enjoy!

https://www.photools.com/community/index.php?topic=3428.msg
https://www.photools.com/community/index.php?topic=4547.msg
Title: Re: Categories to keywords
Post by: Mees Dekker on January 30, 2021, 03:04:29 PM
Thanks for pointing me in the right direction. I now created a working metadata template.

However: although I unchecked both "Write hierarchical keywords" and "Write path elements"; still the complete category tree is written.

Only when I included "leaf" {File.Categories.Direct|filter:Leden;level:leaf}, the lowest level was written as a flat keyword. Am I overlooking something?
Title: Re: Categories to keywords
Post by: Mario on January 30, 2021, 05:39:33 PM
IMatch writes the entire category, either broken up into individual parts of as a hierarchical category.
If you only want to write the lead keyword, you need to configure this explicitly.
Make sure your thesaurus is current, else IMatch will be unable to map back from the leaf keywords to hierarchical keywords if it has to re-import the files later for some reasons.
Title: Re: Categories to keywords
Post by: Mees Dekker on January 30, 2021, 05:54:32 PM
Aahh.

So: what was written "a while ago" by Ferdinand about unchecking (https://www.photools.com/community/index.php?topic=3428.msg) is no longer valid/correct?

I would suggest to update the Help on this item.
Title: Re: Categories to keywords
Post by: Mario on January 30, 2021, 06:57:52 PM
If you only want to write the leaf keyword, uncheck both options (the tooltip explains this as well).
IMatch can flatten "WHERE|location|beach" to either

a. location|beach
b. location
    beach
c. beach

depending on the options you chose.
Title: Re: Categories to keywords
Post by: Mees Dekker on January 30, 2021, 07:22:48 PM
Thanks for the reply. But the point I made is that this does not work. Whatever I uncheck: all is written to the keywords.

The only option that works is to include "level:leaf". Should I open a bug report for this?
Title: Re: Categories to keywords
Post by: Mario on January 30, 2021, 08:07:00 PM
Your metadata template updates hierarchical XMP keywords from categories?
When I set the contents of XMP hierarchical keywords in a Metadata template from the keyword WHERE|location|beach|Daytona while both check boxes in Metadata 1 are off (aka write leaf only), I get:

(https://www.photools.com/community/index.php?action=dlattach;topic=10999.0;attach=26107;image)

which is correct.

Note that changing these options after the keywords have been added has no effect.
Title: Re: Categories to keywords
Post by: Mees Dekker on January 31, 2021, 10:37:32 AM
Hi Mario,

thanks for explaining a few things; I have progressed a little bit further, but I'm still not there.

Attached are screenshots of my metadata-template and the result after I applied that template to a picture of myself and my wife Barbara, did a write back. The IPTC keywords seem to be OK (Trefwoord is Dutch for Keyword). As you see: there is no XMP keyword.

Which exact tags did you use to get the above shown result?
How are XMP keywords filled, what to check/uncheck?
Title: Re: Categories to keywords
Post by: Mario on January 31, 2021, 11:35:32 AM
Only fill {XMP::Lightroom\hierarchicalSubject\HierarchicalSubject}
Do not fill other potential keyword tags because this not monitored by IMatch, works against propagation and flattening.
Title: Re: Categories to keywords
Post by: Mees Dekker on January 31, 2021, 11:45:43 AM
Thanks again, but my XMP keywords still remain empty. Any clue how this comes about?
Title: Re: Categories to keywords
Post by: Mario on January 31, 2021, 12:32:48 PM
No idea. This is usually straight forward.
I've just setup a template and applied it. This produces hierarchical (and flattened) keywords from my categories starting with "Cities" and "Motive":

(https://www.photools.com/community/index.php?action=dlattach;topic=10999.0;attach=26117;image)