X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=parse.pl;h=42f453f7f1ba91d6d5a595d75a4ec11dafe70dec;hb=b2bd805e88f2cf208058408ef04bf78a0d31cffc;hp=2e923a5194eb7ec8f34535910e1519dc4c31e24b;hpb=d6a8c3f05dae1fb3cb51a6f0aaf08e61953e287f;p=lectures%2Fdfb-slides.git diff --git a/parse.pl b/parse.pl index 2e923a5..42f453f 100755 --- a/parse.pl +++ b/parse.pl @@ -5,14 +5,33 @@ chomp @content; @slide=(); -print "\n"; -print "\n"; +print "\n"; +@topics=(); + +foreach(@content) { + if((/^\d/) or (/^ \d/)) { + push(@topics,$_); + #print STDERR "$_\n"; + } +} + +$topic=0; + push(@content," 23"); foreach(@content) { @@ -20,30 +39,60 @@ foreach(@content) { s/&/&/g; s//>/; + + #s/ue/ü/g; + #s/ae/ä/g; + #s/oe/ö/g; + + s/Ue/Ü/g; + s/Ae/Ä/g; + s/Oe/Ö/g; # unterpunkt if(/^ \d/) { if(@slide) { - print "\n"; - pop(@slide); - print "
$topic
\n\n"; + $action=$actions[int(rand($#actions))]; + if(length($action)>0) { + if(int(rand(2))==1) { + $action.=", blend"; + } + } + else { + if(int(rand(2))==1) { + $action.="blend"; + } + } + if(length($action)>0) { + $action=" effect=\"$action\""; + } + print "\n"; + print STDERR "$topics[$topic] $action\n"; + print "
$topics[$topic]
\n\n"; foreach(@slide) { - if(/ \+ /) { + if(/^ \+ /) { s/\+//; - print "$_\n"; + print "\n$_\n"; + } + elsif(/ \+ /) { + s/\+//; + print "\n$_\n"; } else { print "$_\n"; } } print "
\n\n"; + #$topic++; } @slide=(); - #push(@slide,$_); - $topic=$_; + $topic++; + $_=$topics[$topic]; + if(/^\d/) { + $topic++; + } } # ueberpunkt elsif (/^\d/) { - #$topic=$_; + } # normaler content else {