#!/bin/bash # if background.gif and stylesheet.css exist, they will be used. # copyright 2005 John Moyer, All rights reserved. # mailto:jrm@rsok.com # sponsored by http://www.A-Wee-Bit-of-Ireland.com/ DIRNAME=thumbnails$1 DATESTRING=`date +"%Y%b%d"`$1 export DIRNAME export DATESTRING export i make_one_thumbnail() { convert $1 +profile "*" -resize "!43x32" thumbnails/$1 cat >> index.html << EOF

${1}

EOF } export make_one_thumbnail #type make_one_thumbnail if [ -d $DIRNAME ] then echo $DIRNAME already exists. Giving up. echo You could try '"'$0 _1'"' or something similar. exit -1 fi if [ -f index.html ] then echo index.html already exists. Giving up. exit 1 fi mkdir $DIRNAME if [ ! -d $DIRNAME ] then echo failed to make $DIRNAME directory. Giving up. exit -1 fi cat >> index.html << EOF EOF echo 'Photos '$DATESTRING'' >> index.html cat >> index.html << EOF2 EOF2 echo '

Photos '$DATESTRING'

' >> index.html cat >> index.html << EOF3
EOF3 for i in *.jpg do echo "make_one_thumbnail ${i}" make_one_thumbnail ${i} done cat >> index.html << EOF4
 

Web page created by mkthumbindex.sh written by John Moyer
mailto:jrm@rsok.com
Sponsored by http://www.A-Wee-Bit-of-Ireland.com/ Your source in the USA for the finest Irish wool sweaters, ruanas, capes, scarves and hats.

EOF4 #ls -axF $DIRNAME echo thumbnails are in `pwd`/$DIRNAME echo URL is file:///`pwd`/index.html echo script by John Moyer, jrm@rsok.com exit 0