ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: rsjaffe on September 04, 2010, 02:38:06 AM

Title: Avoiding duplicate keywords: problem following the FAQ instructions
Post by: rsjaffe on September 04, 2010, 02:38:06 AM
The FAQ states:
QuoteTo prevent duplication when adding new values, specific values can be deleted then added back again in the same command. For example, the following command adds the keywords "one" and "two", ensuring that they are not duplicated if they already existed in the keywords of an image:
exiftool -keywords-=one -keywords+=one -keywords-=two -keywords+=two DIR
but, when I run "\Program Files (x86)\ExifTool\exiftool.exe"  -if "$MakerNotes:ImageStabilization eq 'Off'" . -v -IPTC:Keywords-="Image Stabilization Off" -IPTC:Keywords+="Image Stabilization Off", The keyword isn't added. If I run the same command without the initial 'remove' part, the keyword does get added. Is there something I'm missing here?

Thanks
Title: Re: Avoiding duplicate keywords: problem following the FAQ instructions
Post by: Phil Harvey on September 04, 2010, 06:40:48 AM
The only thing I can think of is that you're running a very old version of exiftool, because this should work with any recent version.  The current version is 8.29.

- Phil
Title: Re: Avoiding duplicate keywords: problem following the FAQ instructions
Post by: rsjaffe on September 04, 2010, 05:15:01 PM
I have 8.29. After bouncing between exiftool, Adobe Bridge CS5, and exiftoolgui, I found the problem to be that IPTC:Keywords causes the problem (and has conflicts between Bridge and exiftool, while Keywords does not.

"\Program Files (x86)\ExifTool\exiftool.exe"  -if "$MakerNotes:ImageStabilization eq 'Off'" . -v -Keywords-="Image Stabilization Off" -Keywords+="Image Stabilization Off" works

"\Program Files (x86)\ExifTool\exiftool.exe"  -if "$MakerNotes:ImageStabilization eq 'Off'" . -v -IPTC:Keywords-="Image Stabilization Off" -IPTC:Keywords+="Image Stabilization Off" does not



Why would IPTC:Keywords and Keywords act differently? Is it Bridge, exiftool or ?
Title: Re: Avoiding duplicate keywords: problem following the FAQ instructions
Post by: Phil Harvey on September 04, 2010, 06:36:22 PM
I have been recommending that people write the MWG tags (ie. MWG:Keywords) for maximum compatibility with other applications.  The problem is that other software must decide what metadata to use if different types exist, and for a long time now the Adobe products have preferred XMP over IPTC.  Writing the MWG tags ensures that the EXIF, IPTC and XMP metadata remains synchronized.

- Phil
Title: Re: Avoiding duplicate keywords: problem following the FAQ instructions
Post by: rsjaffe on September 05, 2010, 01:10:24 AM
Perhaps you should note in their respective listings (e.g., EXIF:Keywords) that MWG is preferred for best interoperability with various applications. I had no idea.
Title: Re: Avoiding duplicate keywords: problem following the FAQ instructions
Post by: Phil Harvey on September 05, 2010, 06:44:59 AM
Yes.  This problem has been turning up more frequently recently.  I will see what I can do to add this to the documentation.

- Phil