From: hackbard Date: Fri, 28 Feb 2003 03:39:01 +0000 (+0000) Subject: to create xml structure X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=99373af6eedcba9c251dcfcaa6e10e6b1dc69128;p=lectures%2Fdfb-slides.git to create xml structure --- diff --git a/create-xml b/create-xml new file mode 100755 index 0000000..89d7f11 --- /dev/null +++ b/create-xml @@ -0,0 +1,78 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 ... <... kappitel n>" + exit +fi + +name=$1 ; shift 1 +dir=`echo $name | sed 's/.xml//'` +mkdir $dir + +# print normal header +cat > $dir/$name << EOF + + + + +
+
$dir
+
+
desc
+
+ authors + + email: + event: + location: +
+ +EOF + +total=$# +((count = 0)) + +for i in $@; do + ((count += 1)) + cat >> $dir/$name << EOF + + +
+
Kapitel $count
+
+ +EOF + ((j = 0)) + while [ "1" ]; do + ((j += 1)) + cat >> $dir/$name << EOF + $j + + dd, wenn zuviel! :) + dd, wenn zuviel! :) + dd, wenn zuviel! :) + dd, wenn zuviel! :) + +EOF + if [ "$i" = "$j" ]; then + echo "debug: writing $j, finished" + break + else + echo "debug: writing $j from $i" + fi + done + cat >> $dir/$name << EOF +
+ +EOF +done +cat >> $dir/$name << EOF +
+EOF + +echo "done ..."