Script to edit metadata on multiple files, intended as a Nemo action menu item (but can't find "Icon-Name")
by ziphem from LinuxQuestions.org on (#59C76)
I searched for a script that allowed me to select one or several files in Nemo (Cinnamon) and add or edit metadata on them, but I couldn't find anything on point. So, I decided to write a small shell script for this purpose, intended to be used in Nemo as an action.
I haven't been able to figure out where I can find a list of the Icon-Names, so figured I'd put that question here. But my main purpose of this posting was to share this script in case someone else finds it useful. Works in Fedora 31, Cinnamon.
Code:output=$(zenity --forms --title="Metadata field edit" --text="Metadata to create or update" --separator="," --add-combo "Metafield" --combo-values "URL|Author|Comment|Contributors|Copyright|CreateDate|EMail|Keywords|ModifyDate|OriginalDate|Phone|References|Software|Title|Address|City|Country|GPS|PostalCode|State|Altitude|Bearing|DateTime|Distance|Heading|Latitude|Longitude|Satellites|Speed" --add-entry="Metadata")
accepted=$?
if ((accepted != 0)); then
echo "Something's wrong"
exit 1
fi
metafield=$(gawk -F, '{ print $1 }'<<<$output)
metadata=$(gawk -F, '{ print $2 }'<<<$output)
exiftool -P -overwrite_original -$metafield=$metadata $1For reference:
- Exif tags I used are from https://metacpan.org/pod/distributio...l/TagNames.pod
- Actions go in ~/.local/share/nemo/actions/


I haven't been able to figure out where I can find a list of the Icon-Names, so figured I'd put that question here. But my main purpose of this posting was to share this script in case someone else finds it useful. Works in Fedora 31, Cinnamon.
Code:output=$(zenity --forms --title="Metadata field edit" --text="Metadata to create or update" --separator="," --add-combo "Metafield" --combo-values "URL|Author|Comment|Contributors|Copyright|CreateDate|EMail|Keywords|ModifyDate|OriginalDate|Phone|References|Software|Title|Address|City|Country|GPS|PostalCode|State|Altitude|Bearing|DateTime|Distance|Heading|Latitude|Longitude|Satellites|Speed" --add-entry="Metadata")
accepted=$?
if ((accepted != 0)); then
echo "Something's wrong"
exit 1
fi
metafield=$(gawk -F, '{ print $1 }'<<<$output)
metadata=$(gawk -F, '{ print $2 }'<<<$output)
exiftool -P -overwrite_original -$metafield=$metadata $1For reference:
- Exif tags I used are from https://metacpan.org/pod/distributio...l/TagNames.pod
- Actions go in ~/.local/share/nemo/actions/