Keywords from Sony Noise Reduction MarkerNote

Started by illicit1, March 29, 2018, 12:25:52 PM

Previous topic - Next topic

illicit1

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!

Phil Harvey

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
...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 ($).

illicit1

Thanks so much, Phil. This worked. One last thing, is there a way to add to the existing keywords rather than overwrite the sidecar?

Phil Harvey

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
...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 ($).