![]() I decided that I also wanted a blank entry (i.e. ![]() Prompting for a new value is done using read. It’s a nice feature as I appreciate that I don’t have to pipe through sed or awk to extract just the part I want. The IPTC property names are a little opaque, which is partly why I wanted a script as I’m highly unlikely to remember that the title is the ObjectName property! The -s3 ( very very short) flag returns just the text of the property with no label as that’s what I want to store in the variable. for the title: IMAGE_TITLE=$(exiftool -s3 -iptc:ObjectName "$1") Firstly we use exiftool to find the current values of the three properties I care about. There’s a few interesting things that I’d like to point out. iptc:Caption-Abstract="$NEW_DESCRIPTION" \ # set to defaults if we got a blank result Read -e -p "Description : " NEW_DESCRIPTION IMAGE_KEYWORDS=$(exiftool -s -s -s -iptc:Keywords "$1") IMAGE_DESCRIPTION=$(exiftool -s3 -iptc:Caption-Abstract "$1") IMAGE_TITLE=$(exiftool -s3 -iptc:ObjectName "$1") ![]() It’s a lovely tool with many options, so I wrote a script to make it easy and while I was there, used read to prompt me for the info to set. I recently needed to change the title and caption of some photos, so I turned to exiftool as it’s the Swiss Army knife of image metadata.
0 Comments
Leave a Reply. |