X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;fp=parse.pl;h=2e923a5194eb7ec8f34535910e1519dc4c31e24b;hp=0000000000000000000000000000000000000000;hb=d6a8c3f05dae1fb3cb51a6f0aaf08e61953e287f;hpb=93e62a000252832e9fb0d884236eb4c3c51b94ac diff --git a/parse.pl b/parse.pl new file mode 100755 index 0000000..2e923a5 --- /dev/null +++ b/parse.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +@content=; +chomp @content; + +@slide=(); + +print "\n"; +print "\n"; + +push(@content," 23"); + +foreach(@content) { + s/\#.*//; + s/&/&/g; + s//>/; + # unterpunkt + if(/^ \d/) { + if(@slide) { + print "\n"; + pop(@slide); + print "
$topic
\n\n"; + foreach(@slide) { + if(/ \+ /) { + s/\+//; + print "$_\n"; + } + else { + print "$_\n"; + } + } + print "
\n\n"; + } + @slide=(); + #push(@slide,$_); + $topic=$_; + } + # ueberpunkt + elsif (/^\d/) { + #$topic=$_; + } + # normaler content + else { + push(@slide,$_); + } +} + +print "
\n"; \ No newline at end of file