#!/bin/csh -efx

mkdir -p small

set html = heatherlake.html
echo "<html><title>Heather Lake 2009</title><body>" >! $html
echo "<h1>Heather Lake Trail</h1>" >> $html
echo "<p>We hiked the Heather Lake trail on June 18, 2009. " >> $html
echo "Thirteen folks made the trek and were rewarded with snow " >> $html
echo "at the top.</p>" >> $html
foreach file (*.{jpg,JPG})
  set small = small/$file:r.small.jpg
  if (-e $small) then
    echo $small exists.
  else
    convert -resize 120x120 $file $small
  endif
  echo -n "<a href='" >> $html
  echo -n $file >> $html
  echo -n "'><img src='" >> $html
  echo -n $small >> $html
  echo "'></a>" >> $html
end
echo "</body></html>" >> $html

   
