#!/bin/sh
MODE="$1"
FILE="$2"
if [ "$MODE" = "images" ]; then
DATAFILE="gipfelweb/gipfel/${FILE}.imgs"
else
DATAFILE="gipfelweb/gipfel/${FILE}.hills"
fi
TITLE=""
if [ -e "${FILE}.title" ]; then
TITLE=`cat ${FILE}.title`
fi
cat << EOF
EOF
if [ "$MODE" = "images" ]; then
echo ""
else
echo ""
fi
i=0
grep -v "^#" ${DATAFILE} | \
while read name height x y dist flags dummy; do
if [ "${flags}" = "HIDDEN" ]; then
continue
fi
if [ "$MODE" = "images" ]; then
THUMB_TITLE="${name%.jpg}"
if [ -e "${name%.jpg}.title" ]; then
THUMB_TITLE=`cat ${name%.jpg}.title`
fi
echo "