version 1.12, 2012/08/29 12:30:35
|
version 1.13, 2012/08/29 12:41:06
|
Line 5
|
Line 5
|
# can do whatever you want with this stuff. If we meet some day, and you think |
# can do whatever you want with this stuff. If we meet some day, and you think |
# this stuff is worth it, you can buy me a beer in return Aron Schlesinger |
# this stuff is worth it, you can buy me a beer in return Aron Schlesinger |
# |
# |
# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.11 2012/08/29 11:21:41 as Exp $ | # $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.12 2012/08/29 12:30:35 as Exp $ |
# |
# |
|
|
ARG_TITLE="PGallery" |
ARG_TITLE="PGallery" |
Line 442 get_exif_ts()
|
Line 442 get_exif_ts()
|
{ |
{ |
img=$1 |
img=$1 |
date=$($BIN_EXIF --ifd=EXIF --tag=0x9003 -m $img 2> /dev/null) |
date=$($BIN_EXIF --ifd=EXIF --tag=0x9003 -m $img 2> /dev/null) |
test "$date" = "" && return 1 | if [ "$date" = "" ] |
| then |
| echo "-1" |
| return 1 |
| fi |
date -j -f "%Y:%m:%d %T" "$date" "+%s" |
date -j -f "%Y:%m:%d %T" "$date" "+%s" |
} |
} |
|
|
Line 609 done
|
Line 613 done
|
echo |
echo |
|
|
test $(echo $FLIST | wc -w) -eq 0 && err "error: no image found in \`\`$ARG_DIR''" |
test $(echo $FLIST | wc -w) -eq 0 && err "error: no image found in \`\`$ARG_DIR''" |
|
|
|
# use exif createtime to order images |
|
FLIST=$( |
|
( |
|
for file in $FLIST |
|
do |
|
echo "$(get_exif_ts $file) $file" |
|
done |
|
) | sort -n | awk '{print $2}' |
|
) |
|
|
# find new and to update images |
# find new and to update images |
FLIST_NEW= |
FLIST_NEW= |