X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;h=fb51509a918879a28d60136eeb0ff4083c44c073;hp=d5695f2bca4301ca1e65d03079a4434c381597ea;hb=1725e9877e275c3da73250ac5d373eaf532c6027;hpb=eb023953800bf39d877b402bb4300fa8f02486ab diff --git a/parse.pl b/parse.pl index d5695f2..fb51509 100755 --- a/parse.pl +++ b/parse.pl @@ -5,14 +5,46 @@ chomp @content; @slide=(); -print "\n"; -print "\n"; +print "\n\n"; +@topics=(); + +foreach(@content) { + if((/^\d/) or (/^ \d/)) { + push(@topics,$_); + } +} + +print "\n\n"; +print "
Inhalt
\n\n"; +foreach(@topics) { + if(/^\d/) { + print "\n"; + $add="fgcolor=\"#ff00cc\""; + } + else { + $add=""; + } + print "$_\n"; +} +print "
\n\n"; + +$topic=0; + push(@content," 23"); foreach(@content) { @@ -20,14 +52,40 @@ 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$_\n"; + } + elsif(/ \+ /) { s/\+//; print "\n$_\n"; } @@ -36,14 +94,18 @@ foreach(@content) { } } print "
\n\n"; + #$topic++; } @slide=(); - #push(@slide,$_); - $topic=$_; + $topic++; + $_=$topics[$topic]; + if(/^\d/) { + $topic++; + } } # ueberpunkt elsif (/^\d/) { - #$topic=$_; + } # normaler content else {