#!/bin/sh# Copyright 2016 Malte Flender# This file is part of a Malte project.# # This program is free software: you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation version 2 of the License only.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program. If not, see <http://www.gnu.org/licenses/>.Copyright_Owner="Malte Flender"File_Path=$1# Errorhandling:# print the actual command and exit if something went wrongedo(){echo"$@"1>&2"$@"||exit1}# If less than 1 arguments are given exitdie(){echo"$@"exit1}[[$# -eq 1]]|| die "not enough arguments"# Say which fileecho$File_Path# Get title and keywords from promptread -e -p "Enter the Title: `echo $'\n> '`" IPTC_Caption
read -e -p "Enter the Keywords: `echo $'\n> '`" IPTC_Keywords
# Add Caption, Keywords and Copyrightedo exiftool -overwrite_original_in_place -m -adobe=-headline="${IPTC_Caption}"-caption-abstract="${IPTC_Caption}"-keywords="${IPTC_Keywords}"-CopyrightNotice="${Copyright_Owner}"-Creator="${Copyright_Owner}"-CaptionWriter="${Copyright_Owner}"${File_Path}# Show all tags as result after a blank lineechoedo exiftool -a -u -g1 ${File_Path}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.