EOF
}
index_photo() {
local date=$1 photo=$2 thumbnail=$3
cat <<-EOF
EOF
}
set --
for date in 20*; do
mkdir -p static/${date}
page=static/${date}/index.html
if ! test -f $page; then
echo $page >&2
page_head $date >$page
for photo in ${date}/*.JPG; do
preview=$(preview $photo)
if ! test -f static/${photo}; then
ln $photo static/${photo}
fi
page_photo $photo $preview ${photo%.JPG}.txt >>$page
done
fi
set -- $date "$@"
done
echo static/index.html >&2
index_head >static/index.html
for date; do
index_page $date >>static/index.html
for photo in ${date}/*.JPG; do
thumbnail=$(thumbnail $photo)
index_photo $date $photo $thumbnail >>static/index.html
done
done