Diff for /scripts/pgallery/src/pgallery.sh between versions 1.8 and 1.11

version 1.8, 2012/08/28 17:29:32 version 1.11, 2012/08/29 11:21:41
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.7 2012/08/28 17:08:34 as Exp $# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.10 2012/08/29 10:52:35 as Exp $
 #  #
   
 ARG_TITLE="PGallery"  ARG_TITLE="PGallery"
Line 33  BIN_EXIFTRAN="/usr/local/bin/exiftran" Line 33  BIN_EXIFTRAN="/usr/local/bin/exiftran"
 BIN_EXIF="/usr/local/bin/exif"  BIN_EXIF="/usr/local/bin/exif"
   
 MKAKEFILE=".htmakefile"  MKAKEFILE=".htmakefile"
VERSION="pgallery-1.1"VERSION="pgallery-1.2"
   
 #  #
 # usage()  # usage()
Line 461  get_exif_info() Line 461  get_exif_info()
         echo $exifinfo | sed -e 's/ mm /mm /' -e 's/ sec./s/' -e 's/ ISO / ISO/'          echo $exifinfo | sed -e 's/ mm /mm /' -e 's/ sec./s/' -e 's/ ISO / ISO/'
 }  }
   
   #
   # is_in_list()
   #
   is_in_list()
   {
           list=$1
           value=$2
           for entry in $list
           do
                   test "$entry" = "$value" && return 0
           done
           return 1
   }
   
 # parse args  # parse args
 while [ "$1" != "" ]  while [ "$1" != "" ]
 do  do
Line 641  echo "tns: $targets" >> $MKAKEFILE Line 655  echo "tns: $targets" >> $MKAKEFILE
 make -f $MKAKEFILE  make -f $MKAKEFILE
 rm $MKAKEFILE  rm $MKAKEFILE
   
# create single html files# create html index
 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
           echo "<div class='clear'></div>"
           echo "<div class='c'>$ARG_TITLE $ARG_COPYRIGHT</div>"
           html_footer
   ) > $ARG_INDEX
   
   # create single html files
   #test $ARG_UPDATE -eq 1 && FLIST="$FLIST_NEW $FLIST_UPDATE"
 i=0  i=0
 echo -n "create single html files "  echo -n "create single html files "
 for file in $FLIST  for file in $FLIST
Line 651  do Line 682  do
         i=$(($i + 1))          i=$(($i + 1))
         j=$(($i + 1))          j=$(($i + 1))
   
        tn="${file}.tn.jpg"        # is update mod and no new images founded
         if [ $ARG_UPDATE -eq 1 -a "$FLIST_NEW" = "" ]
         then
                 is_in_list "$FLIST_UPDATE" "$file" || continue
         fi
 
         big="${file}.big.jpg"          big="${file}.big.jpg"
         imglink="${file}.html"          imglink="${file}.html"
   
Line 663  do Line 699  do
         test "$linkn" != "" && linkn="$linkn.html"          test "$linkn" != "" && linkn="$linkn.html"
   
         echo -n .          echo -n .
         index="$index $(html_tn $tn $imglink)"  
         (          (
                 html_header                  html_header
                 html_img $file $big $ARG_INDEX "$linkb" "$linkn"                  html_img $file $big $ARG_INDEX "$linkb" "$linkn"
Line 671  do Line 706  do
         ) > $imglink          ) > $imglink
 done  done
 echo  echo
   
 # create html index  
 echo create html index  
 (  
         html_header  
         echo $index  
         echo "<div class='clear'></div>"  
         echo "<div class='c'>$ARG_TITLE $ARG_COPYRIGHT</div>"  
         html_footer  
 ) > $ARG_INDEX  
   
   
 test "$ARG_MAILTO" = "" && exit 0  test "$ARG_MAILTO" = "" && exit 0
   

Removed from v.1.8  
changed lines
  Added in v.1.11