#! /bin/sh # Program to create a wrapper for all files with .gif or .jpg extensions # 2 optional command line parameters are allowed, the width in pixels, # and a prefix for the anchor names in the html file. The program # assumes that jpgnamer has already executed and the jpg files are named # in the format aaa_xxx.jpg where aaa are some alphanumeric characters # and xxx some numeric number. # procedure: # # 1) place yourself in the directory where your pictures are. # 2) type: picwrapper 70% startcount > index.html # # Picwrapper will produce a small html wrapper for each picture # in your directory. The wrapper will have the # same name as the picture but with the extension .html # The "index.html" will contain the name all the wrappers referred to # as named anchors. # The file "index.html" expects all pictures and wrappers do be placed # in the same directory. Similarly all the wrappers # contain a return link to an index.html file in the same directory. # # # The remaining task is to rearrange the photos order in index.html # (perhaps). And to reduce the 70% width to about 40% for the portrait # pictures. If required, text can be added to the wrappers or the index.html # file. Then I edit the name of the photos in index.html at leisure. ############################################################################### DATE=`date +%y%m%d` #If a parameter is given ($# >= 1), we accept it as the width if [ "$#" != "0" ]; then WIDTH=$1 else WIDTH=70% fi echo "" echo "
Previous Photo
" >> $file2 fi echo " " >> $file2 echo " " >> $file2 echo "" >> $file2 echo "