1
0
Fork 0

photoprep: make a bit more readable

This commit is contained in:
tastytea 2024-02-10 19:54:39 +01:00
parent 477b5244d5
commit 2e1ebf100f
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 4 additions and 0 deletions

View File

@ -28,10 +28,14 @@ for file in ${@}; do
newfile=photoprep/${file##*/}
newfile=${newfile%.*}.${format}
local exif_json=$(mktemp --suffix='.photoprep.json')
# write select EXIF data to temporary file
exiftool -json ${file} | jq ${jq_filter} | grep -v null > ${exif_json}
magick -quality ${quality} ${file} -auto-orient -strip -resize ${size} ${newfile}
# add EXIF data to new (scrubbed) file
exiftool -json=${exif_json} -quiet -overwrite_original ${newfile}
rm ${exif_json}
print -n '.'
done
print