From: Steven Baltakatei Sandoval Date: Sat, 8 Jul 2023 12:50:56 +0000 (+0000) Subject: feat(user/bkphotorights):Run command array with error reporting X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/12cd47130a52e2ad9cb3c95f873ed3729f235434 feat(user/bkphotorights):Run command array with error reporting - chore(user/bkphotorights):Add example, fix usage, fix description. Add note to describe what should be changed by the user. --- diff --git a/user/bkphotorights b/user/bkphotorights old mode 100644 new mode 100755 index 1e42cd6..5af038d --- a/user/bkphotorights +++ b/user/bkphotorights @@ -1,12 +1,15 @@ #!/usr/bin/env bash -# Desc: Apply metadata to photos -# Usage: bkphotometa.sh [FILE in] +# Desc: Apply metadata to photos with exiftool +# Usage: bkphotorights [FILE in] # Ref/Attrib: [1]. Creative Commons XMP recommendation. (2015). https://wiki.creativecommons.org/wiki/XMP # [2]. Eva, Johannes. (2023-03-30). “How to edit EXIF metadata via the command line with ExifTool”. libre-software.net. https://libre-software.net/linux/edit-metadata-exiftool/ # [2]. “XMP Tags”. (2023-06-08). exiftool.org. https://exiftool.org/TagNames/XMP.html -# Version: 0.1.2 +# Version: 0.2.0 # Depends: * exiftool 12.16 (https://exiftool.org/ ) # * bash 5.1.16 +# Example: bkphotorights DSC00035.JPG +# Note: Change strCreator, strCreatorURL, strTerms, and strLicenseURL +# values that should be added as metadata to the specified photo. # Adjust me strCreator="Steven Baltakatei Sandoval"; @@ -58,7 +61,7 @@ main() { cmd_args+=("$file_in"); # Execute command - "${cmd_args[@]}"; + must "${cmd_args[@]}"; }; # main program main "$@";