hierarchical tags generated from other tags

Started by Al_Bundy, April 15, 2020, 01:44:25 AM

Previous topic - Next topic

Al_Bundy

Hi,

I have supplemented photos with information about city and country.

Now I want to add this information in the form of keywords to the photos - that works too, I just can't get the compound hierarchical keywords right.

Tags to use:
IPTC:City
XMP:State
XMP:Country

Since I have a keyword hierarchy with several main groups (occasion, persons, etc) these keywords should be sorted in the main group "place

A hierarchical keyword in the following format should be published:
"place|land|state|city".

I would like to map this to a command line that executes the command for each image in a directory.

Probably the solution is quite simple, I just can't find it...

I am using ExifTool on Mac in the Terminal.

Thanks for your support

Al

Phil Harvey

Hi Al,

Something like this may do what you want:

exiftool '-hierarchicalsubject<$country|$state|$city' FILE

If you really need to, you can specify the groups:

exiftool '-hierarchicalsubject<$xmp:country|$xmp:state|$iptc:city' 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 ($).

StarGeek

I think they want this to be under the root word Place, so
exiftool '-hierarchicalsubject<Place|$country|$state|$city' FILE

Though I believe someone recently had a case where the program wasn't reading HierarchicalSubject but instead read the hierarchy from the Subject tag instead.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).