#! /bin/csh -f set cmd = "$0" set usage = "${cmd:t} [ -title STRING ] < IMAGELIST > PAGE.html" # Writes an HTML page to stdout displaying # all image files listed in the standard input. set title = "Image index" while ( ( $#argv > 0 ) && ( "x$1" =~ x-* ) ) if ( ( $#argv >= 2 ) && ( "x$1" == "x-title" ) ) then set title = "$2"; shift; shift else echo "usage: ${usage}"; exit 1 endif end if ( $#argv != 0 ) then echo "usage: ${usage}"; exit 1 endif set tmp = "/tmp/$$" set imlist = ${tmp}-list cat > ${imlist} if ( -z ${imlist} ) then /bin/rm ${imlist} exit 1 endif cat < ${title}

${title}

EOF foreach img ( `cat ${imlist}` ) echo ''' end cat <


Generated on `date` EOF /bin/rm -f ${imlist}