genwebgallery

changeset 47:d1ad806b6ee3 tip

picsize and thumbsize are now numbers in any case (used printf); non-regular and non-existent files are skipped
author meillo@marmaro.de
date Mon, 23 Jun 2008 20:57:55 +0200
parents b991e188f1fa
children
files TODO genwebgallery
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/TODO	Mon Jun 23 20:05:50 2008 +0200
     1.2 +++ b/TODO	Mon Jun 23 20:57:55 2008 +0200
     1.3 @@ -2,10 +2,7 @@
     1.4  
     1.5  - security checks
     1.6  
     1.7 -- navigation in pic pages (really?)
     1.8 -
     1.9  - verify that input files are images
    1.10 -	convert doesnt always return an error code if it is no supported image type
    1.11 +	mogrify doesnt always return an error code if it is no supported image type
    1.12  	so is the problem with gimp's xcf format
    1.13 -
    1.14 -- verify picture and thumbnail sizes are numbers
    1.15 +	(is that solvable in any case??)
     2.1 --- a/genwebgallery	Mon Jun 23 20:05:50 2008 +0200
     2.2 +++ b/genwebgallery	Mon Jun 23 20:57:55 2008 +0200
     2.3 @@ -202,12 +202,12 @@
     2.4  			shift
     2.5  			;;
     2.6  		'-ps' | '--pic-size')
     2.7 -			sizePic="$2"
     2.8 +			sizePic="`echo "$2" | awk '{printf("%d",$0)}'`"
     2.9  			shift
    2.10  			shift
    2.11  			;;
    2.12  		'-ts' | '--thumb-size')
    2.13 -			sizeThumb="$2"
    2.14 +			sizeThumb="`echo "$2" | awk '{printf("%d",$0)}'`"
    2.15  			shift
    2.16  			shift
    2.17  			;;
    2.18 @@ -255,6 +255,13 @@
    2.19  fi
    2.20  
    2.21  for i in "$@" ; do
    2.22 +	# skip over invalid files
    2.23 +	if [ ! -f "$i" ] ; then
    2.24 +		log "does not exist, or no regular file: $i"
    2.25 +		log "  skipping"
    2.26 +		continue
    2.27 +	fi
    2.28 +
    2.29  	file="`basename $i`"
    2.30  	targetFile="$targetDir/$file.htm"
    2.31  	log "processing file: $file"