diff options
author | Sudo Nice <sudo.nice@gmail.com> | 2015-12-23 12:43:20 +0300 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2015-12-25 11:23:41 +0100 |
commit | b32aefce3a8c98c3ddb35f8f5e89b56ca757ad61 (patch) | |
tree | b98c339fa405bde673d42514ca4a30cb666ca854 /exec | |
parent | 93e2d03c7340b04178f0a59ce18a07e7dd6a3582 (diff) |
Make image-info script more steady to special symbols in file names
Diffstat (limited to 'exec')
-rw-r--r-- | exec/image-info | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/exec/image-info b/exec/image-info index f839a36..a14ee7a 100644 --- a/exec/image-info +++ b/exec/image-info @@ -7,13 +7,11 @@ s=" | " # field separator -filename=$(basename "$1") -filesize=$(du -Hh "$1" | cut -f 1) +filename=$(basename -- "$1") +filesize=$(du -Hh -- "$1" | cut -f 1) -geometry=$(identify -format '%wx%h' "$1[0]") - -tags=$(exiv2 -q -P v -g "Iptc.Application2.Keywords" "$1" | tr '\n' ',') -tags=${tags%,} +geometry=$(identify -format '%wx%h' ":$1[0]") +tags=$(identify -format '%[IPTC:2:25]' ":$1" | tr ';' ',') echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}" |