Diff for /scripts/pgallery/src/pgallery.sh between versions 1.19 and 1.21

version 1.19, 2012/08/31 14:26:58 version 1.21, 2012/08/31 15:58:03
Line 1 Line 1
#!/bin/sh#!/home/as/sh
 #  #
 # THE BEER-WARE LICENSE 2012  # THE BEER-WARE LICENSE 2012
 # <as@paefchen.net> wrote this file. As long as you retain this notice you  # <as@paefchen.net> wrote this file. As long as you retain this notice you
 # 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.18 2012/08/31 12:33:07 as Exp $# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.20 2012/08/31 15:52:10 as Exp $
 #  #
 . $(dirname $0)/libpgallery  . $(dirname $0)/libpgallery
   
Line 28  ARG_EXIF="0x920a 0x829d 0x829a ISO 0x8827 / 0x010f - 0 Line 28  ARG_EXIF="0x920a 0x829d 0x829a ISO 0x8827 / 0x010f - 0
 ARG_INDEXIMG=  ARG_INDEXIMG=
 ARG_STARTTS=  ARG_STARTTS=
 ARG_ENDTS=  ARG_ENDTS=
   ARG_LINK=
   
 MKAKEFILE=".htmakefile"  MKAKEFILE=".htmakefile"
   
Line 38  usage() Line 39  usage()
 {  {
         cat <<USAGE          cat <<USAGE
 usage $0: ( [-f <files>] | [-s <suffix>] ) [-d <dir>] [-n <name>]  usage $0: ( [-f <files>] | [-s <suffix>] ) [-d <dir>] [-n <name>]
                [-t <thumbnail_size>] [-u <thumbnail_quality>]                [-t <thumbnail_size>] [-u <thumbnail_quality>] [-H <link>]
                 [-b <big_size>] [-c <big_quality>] [-l link] [-e <exif>]                  [-b <big_size>] [-c <big_quality>] [-l link] [-e <exif>]
                 [-i <index>] [-C <copyright>] [-F <mailfrom>] [-T <mailto>]                  [-i <index>] [-C <copyright>] [-F <mailfrom>] [-T <mailto>]
                 [-U] | -h | -v                  [-U] | -h | -v
Line 62  Options: Line 63  Options:
   -v            print version    -v            print version
   -C copyright  copyright (html) string (default: $ARG_COPYRIGHT)    -C copyright  copyright (html) string (default: $ARG_COPYRIGHT)
   -F from       mail sender (default: $ARG_MAILFROM)    -F from       mail sender (default: $ARG_MAILFROM)
     -L link       optional home link
   -I file       info text file for pgallery. info file paras prefered.    -I file       info text file for pgallery. info file paras prefered.
                 the syntax of the file is MAKE(1)                  the syntax of the file is MAKE(1)
                 supported variable: TITLE COPYRIGHT INDEX FILETYPES TNSIZE URL                  supported variable: TITLE COPYRIGHT INDEX FILETYPES TNSIZE URL
                                     TNQALITY BIGSIZE BIGQALITY MAILTO MAILFROM                                      TNQALITY BIGSIZE BIGQALITY MAILTO MAILFROM
                                    EXIF INDEXIMG                                    EXIF INDEXIMG LINK
   -T mailto     send update infos to this address. if not set, no mail delivery    -T mailto     send update infos to this address. if not set, no mail delivery
   -U            no update, new calculation of all images.    -U            no update, new calculation of all images.
                 normally only new and modified images will calculated                  normally only new and modified images will calculated
Line 86  do Line 88  do
         test $arg = -d && is_dir=1          test $arg = -d && is_dir=1
 done  done
   
 echo $ARG_DIR  
   
 # load save args  # load save args
 if [ -f "$ARG_DIR/$ARGFILE" ]  if [ -f "$ARG_DIR/$ARGFILE" ]
 then  then
Line 139  do Line 139  do
                 -F)                  -F)
                         ARG_MAILFROM=$1                          ARG_MAILFROM=$1
                         shift;;                          shift;;
                   -L)
                           ARG_LINK=$1
                           shift;;
                 -I)                  -I)
                         ARG_INFOFILE=$1                          ARG_INFOFILE=$1
                         shift;;                          shift;;
Line 165  if [ "$ARG_INFOFILE" != "" ] Line 168  if [ "$ARG_INFOFILE" != "" ]
 then  then
         test -f $ARG_INFOFILE || err "info file not found \`\`$ARG_INFOFILE''"          test -f $ARG_INFOFILE || err "info file not found \`\`$ARG_INFOFILE''"
         for n in TITLE COPYRIGHT INDEX FILETYPES TNSIZE TNQALITY BIGSIZE \          for n in TITLE COPYRIGHT INDEX FILETYPES TNSIZE TNQALITY BIGSIZE \
                BIGQALITY MAILTO MAILFROM URL EXIF INDEXIMG                BIGQALITY MAILTO MAILFROM URL EXIF INDEXIMG LINK
         do          do
                 v=$(make -f $ARG_INFOFILE -V$n)                  v=$(make -f $ARG_INFOFILE -V$n)
                 test "$v" = "" && continue                  test "$v" = "" && continue
Line 315  rm $MKAKEFILE Line 318  rm $MKAKEFILE
 echo create html index  echo create html index
 (  (
         html_header          html_header
   
         startdate=          startdate=
         test $ARG_STARTTS -ne -1 && startdate=$(date -r $ARG_STARTTS "+%d.%m.%Y")          test $ARG_STARTTS -ne -1 && startdate=$(date -r $ARG_STARTTS "+%d.%m.%Y")
         enddate=          enddate=
Line 322  echo create html index Line 326  echo create html index
         date=          date=
         test "$startdate" != "" && date="$startdate"          test "$startdate" != "" && date="$startdate"
         test "$enddate" != "$startdate" && date="$date - $enddate"          test "$enddate" != "$startdate" && date="$date - $enddate"
           link=
           test "$ARG_LINK" != "" && link="<a href='$ARG_LINK'>overview</a>"
           html_title "$ARG_TITLE" "$link" "$date"
   
         html_title "$ARG_TITLE" "$date"  
         for file in $FLIST          for file in $FLIST
         do          do
                 tn="${file}.tn.jpg"                  tn="${file}.tn.jpg"

Removed from v.1.19  
changed lines
  Added in v.1.21