Created
July 11, 2016 07:45
-
-
Save dmpop/e599faf75edcba6c4a896a95e4846853 to your computer and use it in GitHub Desktop.
Helper script for using ExifTool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#OPTIND=1 | |
while getopts "h?sdyar" opt; do | |
case $opt in | |
s) exiftool -directory=%e . | |
;; | |
d) exiftool -d %Y%m%d-%H%M%S.%%e '-FileName<DateTimeOriginal' -r . | |
;; | |
y) exiftool '-Directory<CreateDate' -d %Y-%m-%d -r . | |
;; | |
a) exiftool -T -r -filename -make -model -fnumber -exposuretime -iso -r . > results.txt | |
;; | |
r) exiftool -overwrite_original -all= -r . | |
;; | |
h|\?) | |
cat <<EOF | |
USAGE: | |
$0 [OPTIONS] | |
$0 -s sort photos into folders by file extension | |
$0 -d rename photos by date | |
$0 -y sort photos into folders by year, month, and date | |
$0 -a save key EXIF data in the results.txt file | |
$0 -r remove all EXIF metadata from photos | |
EOF | |
exit 2 | |
;; | |
esac | |
done | |
#shift $((OPTIND-1)) | |
#[ "$1" = "--" ] && shift |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment