ExifTool Forum

ExifTool => Newbies => Topic started by: illicit1 on March 29, 2018, 12:25:52 PM

Title: Keywords from Sony Noise Reduction MarkerNote
Post by: illicit1 on March 29, 2018, 12:25:52 PM
Hi,

I am trying to convert the result of the exif tag "Long Exposure Noise Reduction" to a keyword of "Long Exposure Noise Reduction On" or "Long Exposure Noise Reduction Off" saved into the sidecar file.

exiftool displays it as:

Long Exposure Noise Reduction   : Off

Any assistance would be very much appreciated!
Title: Re: Keywords from Sony Noise Reduction MarkerNote
Post by: Phil Harvey on March 29, 2018, 12:46:50 PM
I think that something like this may be what you want:

exiftool "-subject+<${LongExposureNoiseReduction;$_=qq(Long Exposure Noise Reduction $_)}" FILE

Here I have used the qq() quoting to get around the problem of quotes within quotes.

- Phil

Edit:  Here is a cool alternative that avoids the need for nested quotes:

exiftool "-subject+<${LongExposureNoiseReduction;s/^/Long Exposure Noise Reduction /}" FILE
Title: Re: Keywords from Sony Noise Reduction MarkerNote
Post by: illicit1 on March 29, 2018, 01:08:55 PM
Thanks so much, Phil. This worked. One last thing, is there a way to add to the existing keywords rather than overwrite the sidecar?
Title: Re: Keywords from Sony Noise Reduction MarkerNote
Post by: Phil Harvey on March 29, 2018, 01:12:55 PM
Oh, right.  You wanted this for a sidecar (I'm assuming XMP-format) file:

exiftool -srcfile %d%f.xmp "-subject+<${LongExposureNoiseReduction;s/^/Long Exposure Noise Reduction /}" FILE

Where FILE is your image file name.  Or directory name, but then you should add -ext options for the image file types you want to process.

Existing XMP in the sidecar will be preserved.  It will be created it it didn't exist beforehand.

- Phil