Categories to keywords

Started by Mees Dekker, January 28, 2021, 02:02:08 PM

Previous topic - Next topic

Mees Dekker

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)?


Jingo

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

Mees Dekker

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?

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

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.

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

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?

Mario

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:



which is correct.

Note that changing these options after the keywords have been added has no effect.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

#8
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?

Mario

Only fill {XMP::Lightroom\hierarchicalSubject\HierarchicalSubject}
Do not fill other potential keyword tags because this not monitored by IMatch, works against propagation and flattening.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mees Dekker

Thanks again, but my XMP keywords still remain empty. Any clue how this comes about?

Mario

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":

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