ExifTool Forum

ExifTool => Newbies => Topic started by: mrhoward on March 03, 2020, 05:17:11 AM

Title: Converting IPTC keywords to Mac tags (Windows->Mac)
Post by: mrhoward on March 03, 2020, 05:17:11 AM
Hello all,

I am very new to the fantastic Exiftool and would have a question. I searched the forum but could not find an appropriate answer, but that's maybe from a misunderstanding in the tool for me. (I hope not, I don't want to bother anyone)

I recently copied several images (JPG mostly) from a Windows 10 system to a MacBook Pro.

I see all the metadata known as "IPTC keywords" when I right click and view the information in Finder on the Macbook, but I would of course like to use this information directly in Finder.

So my question is, is there a possibility using Exiftool to actually read the IPTC keywords and copy them as "tags" on the Macbook ? Either as a new file or as an update of the current file.

I'd like doing that for several folders, so I need to do this recursively.

Thank you very much !
Title: Re: Converting IPTC keywords to Mac tags (Windows->Mac)
Post by: Phil Harvey on March 03, 2020, 07:34:31 AM
Assuming that your keywords are stored in XMP:Subject, the following command may do what you want:

exiftool "-mditemusertags<subject" -r DIR

but note that this requires you have the "tag" utility installed.  This may be installed with "brew install tag" if you have homebrew installed.

- Phil
Title: Re: Converting IPTC keywords to Mac tags (Windows->Mac)
Post by: mrhoward on March 03, 2020, 08:42:56 AM
Thank you very much for your answer. For the moment I am looking at where the data is stored in the JPG file.

Output of simple exiftool command on the Macbook:


>exiftool DSC_0638.JPG | grep -i mykeyword1
XP Keywords                     : mykeyword1
Subject                         : mykeyword1
Last Keyword XMP                : mykeyword1


As you can see, my keyword is stored in 3 different variables. Problem is, that image has 2 different keywords.

>exiftool DSC_0638.JPG | grep -i mykeyword2
>

So, my second keyword is not stored anywhere in the output of exiftool. Maybe I use a wrong command ?

Important detail: the second keyword is shown when using Finder/Get Infos. So it is there.

Thank you once again !
Title: Re: Converting IPTC keywords to Mac tags (Windows->Mac)
Post by: Phil Harvey on March 03, 2020, 08:45:38 AM
XMP Subject should show both keywords like this:

Subject                         : mykeyword1, mykeyword2

If it doesn't, then the second keyword isn't stored properly.

Try this just in case it is in a duplicate tag name somewhere else:

exiftool -G1 -a DSC_0638.JPG | grep -i mykeyword

- Phil
Title: Re: Converting IPTC keywords to Mac tags (Windows->Mac)
Post by: mrhoward on March 03, 2020, 05:54:50 PM
Well somehow the JPG file I used for testing was bad.

I did tests with another JPG using several different IPTC keywords, and it worked like a charm, I got them as tags and everything works fine.

Thanks a lot for the help, Phil, highly appreciated and so fast ! You rock :-)