#!/bin/sh # # drft06rr_photos - Makes html file drft06rr_photos.html # # Paul Wessel, 20-NOV-2001 date=`date` prefix=drft06rr mkdir -p $prefix/photos cat << EOF > $prefix/drft06rr_photos.html Drift Expedition Leg 6: Rock Pictures and More!

Pictures of rocks and jocks and what not

These are miscellaneous pictures taken by several people and listed in no particular order. More specific photos of dredge samples can be found under each dredge.

EOF # Need a list of all images, excluding the thumbnail photos starting with thm_* ls $prefix/photos | grep -v '^thm_' > photos.lis # Also need a short awk script to format pictures 8 to a row: cat << EOF > photos.awk { printf "\"%s\"\n", \$1, \$1, \$1, \$1 if ((NR % 8) == 0) printf "

\n" } EOF awk -f photos.awk photos.lis >> $prefix/drft06rr_photos.html cat << EOF >> $prefix/drft06rr_photos.html

DRFT06RR home Return to Drift Expedition Leg 6 home page


drft06rr_photos: Page last updated $date by $USER. EOF # Create thumbnails for any image that doesn't have one npix=`cat photos.lis | wc -l` i=1 while [ $i -le $npix ]; do pix=`sed -n ${i}p photos.lis` thumb="$prefix/photos/thm_$pix" if [ ! -f $thumb ]; then alchemy $prefix/photos/$pix -Xb80 -Yb60 -j $thumb fi i=`expr $i + 1` done rm -f photos.awk photos.lis