Diff for /scripts/pgallery/src/pgallery.sh between versions 1.12 and 1.14

version 1.12, 2012/08/29 12:30:35 version 1.14, 2012/08/29 13:36:01
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.13 2012/08/29 12:41:06 as Exp $
 #  #
   
 ARG_TITLE="PGallery"  ARG_TITLE="PGallery"
Line 360  html_img() Line 360  html_img()
   
         if [ "$linkb" != "" ]          if [ "$linkb" != "" ]
         then          then
                hlinkb="<a href='$linkb'>back</a>"                hlinkb="<a href='$linkb'>prev</a>"
                 olinkb="<a class='left' style='height:${height}px' href='$linkb'></a>"                  olinkb="<a class='left' style='height:${height}px' href='$linkb'></a>"
         fi          fi
   
         if [ "$linkn" != "" ]          if [ "$linkn" != "" ]
         then          then
                hlinkn="<a href="$linkn">forward</a>"                hlinkn="<a href="$linkn">next</a>"
                 olinkn="<a class='right' style='height:${height}px' href='$linkn'></a>"                  olinkn="<a class='right' style='height:${height}px' href='$linkn'></a>"
         fi          fi
   
Line 374  html_img() Line 374  html_img()
 <div class="box">  <div class="box">
         <div class="nav">          <div class="nav">
                 <div class="top">                  <div class="top">
                        <a href="$link">Index</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="$orig">original</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;$num/$all                        <a href="$link">index</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="$orig">original</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;$num/$all
                 </div>                  </div>
                 <div class="left">$hlinkb</div>                  <div class="left">$hlinkb</div>
                 <div class="right">$hlinkn</div>                  <div class="right">$hlinkn</div>
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 562  do Line 566  do
         esac          esac
 done  done
   
   # go to gallery directory
   MY=$(get_my_path)
   cd "$ARG_DIR" || exit 1
   
 # parese info file  # parese info file
 if [ "$ARG_INFOFILE" != "" ]  if [ "$ARG_INFOFILE" != "" ]
 then  then
Line 575  then Line 583  then
         done              done    
 fi  fi
   
 # go to gallery directory  
 MY=$(get_my_path)  
 cd "$ARG_DIR" || exit 1  
   
 # fix url  # fix url
 if [ "$ARG_URL" != "" ]  if [ "$ARG_URL" != "" ]
 then  then
Line 610  echo  Line 614  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=
 FLIST_UPDATE=  FLIST_UPDATE=
Line 678  MAKE Line 692  MAKE
 done  done
 echo "tns: $targets" >> $MKAKEFILE  echo "tns: $targets" >> $MKAKEFILE
   
#make -f $MKAKEFILEmake -f $MKAKEFILE
 rm $MKAKEFILE  rm $MKAKEFILE
   
 # create html index  # create html index

Removed from v.1.12  
changed lines
  Added in v.1.14