#!/bin/sh MODE="$1" TITLE="$2" FILE="$3" if [ "$MODE" = "images" ]; then DATAFILE="gipfelweb/gipfel/${FILE}.imgs" else DATAFILE="gipfelweb/gipfel/${FILE}.hills" fi cat << EOF EOF echo "$TITLE" cat << EOF

EOF echo "

$TITLE

" if [ "$MODE" = "images" ]; then echo "show hill names" else echo "back to gipfelweb" fi cat << EOF
EOF if [ "$MODE" = "images" ]; then echo "" else echo "" fi echo "
    " i=0 grep -v "^#" ${DATAFILE} | \ while read name height x y dist flags dummy; do if [ "$MODE" = "images" ]; then THUMB_TITLE="${name%.jpg}" if [ -e "${name%.jpg}.title" ]; then THUMB_TITLE=`cat ${name%.jpg}.title` fi echo "
  • ${THUMB_TITLE} (${height}m)
  • " else echo "
  • ${name} (${height}m)
  • " fi i=$((${i} + 1)) done echo "
" cat << EOF

Created with gipfel

EOF if [ "$MODE" = "images" ]; then echo Move the mouse over the image to see other images. else echo Move the mouse over the image to see known mountains. fi cat << EOF
Move the mouse over the rectangle to see details.

This image is visible on these images:
EOF grep -l ${FILE} gipfelweb/gipfel/*.imgs | \ while read f; do img="`basename ${f%.imgs}`" if [ "$MODE" = "images" ]; then echo "
" else echo "
" fi done cat << EOF EOF