]> hackdaworld.org Git - lectures/dfb-slides.git/commitdiff
to create xml structure
authorhackbard <hackbard>
Fri, 28 Feb 2003 03:39:01 +0000 (03:39 +0000)
committerhackbard <hackbard>
Fri, 28 Feb 2003 03:39:01 +0000 (03:39 +0000)
create-xml [new file with mode: 0755]

diff --git a/create-xml b/create-xml
new file mode 100755 (executable)
index 0000000..89d7f11
--- /dev/null
@@ -0,0 +1,78 @@
+#!/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 ..."