X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;h=ba9709040786c0e1f35ffd3654117e490fc7ac09;hp=a25052fa9a13ce2f4960665fe89fce227078015d;hb=HEAD;hpb=30b736f4c67d275b2e828da4543e65ee459786c3 diff --git a/parse.pl b/parse.pl index a25052f..ba97090 100755 --- a/parse.pl +++ b/parse.pl @@ -4,8 +4,10 @@ chomp @content; @slide=(); +@topics=(); -@actions=( "slide top", +@actions=( "", + "slide top", "slide top right", "slide top left", "slide bottom", @@ -15,15 +17,44 @@ chomp @content; "slide right"); print "\n"; -print "\n"; +open(IN,"../head2xml header|") or die "no head2xml / header!!\n"; +while() { + print $_; +} +close(IN); + +foreach(@content) { + if((/^\d/) or (/^ \d/)) { + push(@topics,$_); + } +} + +print "\n\n"; +print "
Inhalt
\n\n"; +foreach(@topics) { + if(/^\d/) { + print "\n"; + $add="fgcolor=\"#FF0000\""; + } + else { + $add=""; + } + print "$_\n"; +} +print "
\n\n"; + +$topic=0; + push(@content," 23"); foreach(@content) { s/\#.*//; + if(not /^\s+$/) { s/&/&/g; s//>/; @@ -38,11 +69,29 @@ 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(/ \+ /) { + if(/^ \+ /) { + s/\+//; + print "\n$_\n"; + } + elsif(/ \+ /) { s/\+//; print "\n$_\n"; } @@ -51,19 +100,24 @@ foreach(@content) { } } print "
\n\n"; + #$topic++; } @slide=(); - #push(@slide,$_); - $topic=$_; + $topic++; + $_=$topics[$topic]; + if(/^\d/) { + $topic++; + } } # ueberpunkt elsif (/^\d/) { - #$topic=$_; + } # normaler content else { push(@slide,$_); } } +} print "
\n"; \ No newline at end of file