X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=parse.pl;h=fb51509a918879a28d60136eeb0ff4083c44c073;hb=8e69d8274b3ec021455ba262c172367c367d3e6b;hp=e071258591e281d282dbf9677ffd9fecee67a63a;hpb=dd74245a5f1d1e5b9449cd5e41f56d5929ddf462;p=lectures%2Fdfb-slides.git diff --git a/parse.pl b/parse.pl index e071258..fb51509 100755 --- a/parse.pl +++ b/parse.pl @@ -5,7 +5,8 @@ chomp @content; @slide=(); -@actions=( "slide top", +@actions=( "", + "slide top", "slide top right", "slide top left", "slide bottom", @@ -15,11 +16,35 @@ chomp @content; "slide right"); print "\n"; -print "\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) { @@ -38,9 +63,23 @@ foreach(@content) { # 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(/^ \+ /) { s/\+//; @@ -55,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 {