--- /dev/null
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "usage: $0 <name.xml> <unterpunkte kapitel 1> ... <... kappitel n>"
+ exit
+fi
+
+name=$1 ; shift 1
+dir=`echo $name | sed 's/.xml//'`
+mkdir $dir
+
+# print normal header
+cat > $dir/$name << EOF
+<?xml version='1.0'?>
+
+<slides effect="slide top left, blend"
+ bgcolor="#000000" fgcolor="#FFFFFF"
+ face="../ttf/decker.ttf" size="15"
+ bgimage="../img/bg.png"
+ bullet="../img/bullet.png"
+ screen_width="1024" screen_height="768">
+ <slide effect="none">
+ <header size="10"></header>
+ <header fgcolor="#5080FF" size="80">$dir</header>
+ <header size="20"></header>
+ <header fgcolor="#5080FF" size="35">desc</header>
+ <header size="40"></header>
+ <text>authors</text>
+ <text/>
+ <text>email: </text>
+ <text>event: </text>
+ <text>location: </text>
+ </slide>
+
+EOF
+
+total=$#
+((count = 0))
+
+for i in $@; do
+ ((count += 1))
+ cat >> $dir/$name << EOF
+
+ <slide>
+ <header size="10"></header>
+ <header fgcolor="#8080FF" size="35">Kapitel $count</header>
+ <header size="20"></header>
+
+EOF
+ ((j = 0))
+ while [ "1" ]; do
+ ((j += 1))
+ cat >> $dir/$name << EOF
+ <text size="20">$j</text>
+ <text/>
+ <listitem size="20">dd, wenn zuviel! :)</listitem>
+ <listitem size="20">dd, wenn zuviel! :)</listitem>
+ <listitem size="20">dd, wenn zuviel! :)</listitem>
+ <listitem size="20">dd, wenn zuviel! :)</listitem>
+ <text/>
+EOF
+ if [ "$i" = "$j" ]; then
+ echo "debug: writing $j, finished"
+ break
+ else
+ echo "debug: writing $j from $i"
+ fi
+ done
+ cat >> $dir/$name << EOF
+ </slide>
+
+EOF
+done
+cat >> $dir/$name << EOF
+</slides>
+EOF
+
+echo "done ..."