X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=parse.pl;h=a06ff05d04483f2375cf1699b8dd0a2c8f818f15;hb=f6ebf37351034e1632eabdd0aded671cc35d4656;hp=e071258591e281d282dbf9677ffd9fecee67a63a;hpb=dd74245a5f1d1e5b9449cd5e41f56d5929ddf462;p=lectures%2Fdfb-slides.git diff --git a/parse.pl b/parse.pl index e071258..a06ff05 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", @@ -20,6 +21,17 @@ print "\n"; +@topics=(); + +foreach(@content) { + if((/^\d/) or (/^ \d/)) { + push(@topics,$_); + #print STDERR "$_\n"; + } +} + +$topic=0; + push(@content," 23"); foreach(@content) { @@ -39,8 +51,8 @@ foreach(@content) { if(/^ \d/) { if(@slide) { print "\n"; - pop(@slide); - print "
$topic
\n\n"; + print STDERR "$topics[$topic]\n"; + print "
$topics[$topic]
\n\n"; foreach(@slide) { if(/^ \+ /) { s/\+//; @@ -55,14 +67,18 @@ foreach(@content) { } } print "
\n\n"; + #$topic++; } @slide=(); - #push(@slide,$_); - $topic=$_; + $topic++; + $_=$topics[$topic]; + if(/^\d/) { + $topic++; + } } # ueberpunkt elsif (/^\d/) { - #$topic=$_; + } # normaler content else {