nsxiv: get lowest date from metadata

This commit is contained in:
2024-04-05 10:50:33 +02:00
parent 9641482295
commit 78d4618dfa
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,6 @@ filesize=$(du -Hh -- "$1" | cut -f 1)
geometry="${2}x${3}"
#TODO: imrpove for multiple date formats
#currently just picks the first date that is not a profile or file date using exiftool (no one coherent standard for date in exif metadata is used)
date_shot="$(exiftool -- "$1" | grep 'Date' | grep -vE '(Profile|File)' | head -n1 | cut -d: -f1 --complement)"
date_shot="$(exiftool -- "$1" | grep 'Date' | grep -vE '(Profile|File)' | cut -d: -f1 --complement | sort | head -n1)"
echo "${filesize}${s}${geometry}${s}${filename}${s}${date_shot}"