--- scripts/pgallery/src/pgallery.sh 2012/08/31 12:33:07 1.18 +++ scripts/pgallery/src/pgallery.sh 2012/08/31 14:26:58 1.19 @@ -5,7 +5,7 @@ # 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 # -# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.17 2012/08/29 14:44:04 as Exp $ +# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.18 2012/08/31 12:33:07 as Exp $ # . $(dirname $0)/libpgallery @@ -26,6 +26,8 @@ ARG_MAILFROM="PGallery <${USER}@${HOST}>" ARG_URL= ARG_EXIF="0x920a 0x829d 0x829a ISO 0x8827 / 0x010f - 0x0110" ARG_INDEXIMG= +ARG_STARTTS= +ARG_ENDTS= MKAKEFILE=".htmakefile" @@ -225,6 +227,10 @@ FLIST=$( # if no master image, we use the first one test "$ARG_INDEXIMG" = "" && ARG_INDEXIMG=$(echo $FLIST | awk '{print $1}') +# find start and end ts +ARG_STARTTS=$(get_exif_ts $(echo $FLIST | awk '{print $1}')) +ARG_ENDTS=$(get_exif_ts $(echo $FLIST | awk '{print $NF}')) + # find new and to update images FLIST_NEW= FLIST_UPDATE= @@ -302,21 +308,28 @@ MAKE done echo "tns: $targets" >> $MKAKEFILE -make -f $MKAKEFILE +#make -f $MKAKEFILE rm $MKAKEFILE # create html index -index="" -for file in $FLIST -do - tn="${file}.tn.jpg" - imglink="${file}.html" - index="$index $(html_tn $tn $imglink)" -done echo create html index ( html_header - echo $index + startdate= + test $ARG_STARTTS -ne -1 && startdate=$(date -r $ARG_STARTTS "+%d.%m.%Y") + enddate= + test $ARG_ENDTS -ne -1 && enddate=$(date -r $ARG_ENDTS "+%d.%m.%Y") + date= + test "$startdate" != "" && date="$startdate" + test "$enddate" != "$startdate" && date="$date - $enddate" + + html_title "$ARG_TITLE" "$date" + for file in $FLIST + do + tn="${file}.tn.jpg" + imglink="${file}.html" + html_tn $tn $imglink + done echo "
" echo "