X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;h=0dbf9a076a416c20e144bcd4a952b5f5680309a5;hp=e071258591e281d282dbf9677ffd9fecee67a63a;hb=56d4b0f73d20f1104a304573aac565db10446262;hpb=dd74245a5f1d1e5b9449cd5e41f56d5929ddf462 diff --git a/parse.pl b/parse.pl index e071258..0dbf9a0 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) { @@ -40,7 +52,8 @@ foreach(@content) { 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 +68,18 @@ foreach(@content) { } } print "
\n\n"; + #$topic++; } @slide=(); - #push(@slide,$_); - $topic=$_; + $topic++; + $_=$topics[$topic]; + if(/^\d/) { + $topic++; + } } # ueberpunkt elsif (/^\d/) { - #$topic=$_; + } # normaler content else {