summaryrefslogtreecommitdiff
path: root/examples/gipfel2html
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-08-10 17:56:37 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-08-10 17:56:37 +0200
commitc712d598ea39dc4f90a733dc06c44617eb30bcbb (patch)
tree5c1d822deff1877ec78499761d6c19745cc31f81 /examples/gipfel2html
parentdadd1edab19c6f87c3e8cca7e9fbcce554dd4cb0 (diff)
implement automatic gipfelweb generation
Diffstat (limited to 'examples/gipfel2html')
-rwxr-xr-xexamples/gipfel2html47
1 files changed, 47 insertions, 0 deletions
diff --git a/examples/gipfel2html b/examples/gipfel2html
new file mode 100755
index 0000000..1016b94
--- /dev/null
+++ b/examples/gipfel2html
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+cat << EOF
+<html>
+<head>
+<style type="text/css">
+#gipfel { display: block; position: relative; width: 1536px; height: 864px; margin: 0; padding: 0; }
+#gipfel li { visibility: hidden; list-style-type: none; position: absolute; background: url(25w.png); border: 1px solid black; font-family: sans-serif; font-size: x-small; color: #000; padding: 0; line-height: 1.3em; overflow: hidden; }
+#gipfel span { visibility: hidden; position: absolute; left: 0; right: 0; display: block; padding: 5px; }
+#gipfel:hover li { visibility: visible; }
+#gipfel li:hover span {visibility: visible;}
+EOF
+
+i=0
+grep -v "^#" gipfelweb/gipfel/${1}.gipf | \
+while read name height x y dist flags dummy; do
+ thumb_w=`identify -format %w gipfelweb/thumbs/${name}`
+ thumb_h=`identify -format %h gipfelweb/thumbs/${name}`
+
+ echo "#id_${i} {left:$((${x} - 20 / 2))px; top: $((${y} - 20 / 2))px; width: 20px; height: 20px;}"
+ echo "#id_${i}:hover {width: ${thumb_w}px; height: ${thumb_h}px; background: url(thumbs/${name});}"
+
+ i=$((${i} + 1))
+done
+
+echo "</style></head>"
+echo "<body bgcolor=\"#333333\">"
+echo "<div id=\"gipfel\"><img src=\"slides/${1}.jpg\"/>"
+
+i=0
+grep -v "^#" gipfelweb/gipfel/${1}.gipf | \
+while read name height x y dist flags dummy; do
+ if [ "${flags}" = "HIDDEN" ]; then
+ continue
+ fi
+
+ echo "<li id=\"id_${i}\"><a href=\"${name%.jpg}.html\"><span>${name} (${height}m)</span></a></li>"
+
+ i=$((${i} + 1))
+done
+
+cat << EOF
+</ul>
+</div>
+</body>
+<html>
+EOF