X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;h=ba9709040786c0e1f35ffd3654117e490fc7ac09;hp=2e923a5194eb7ec8f34535910e1519dc4c31e24b;hb=HEAD;hpb=d6a8c3f05dae1fb3cb51a6f0aaf08e61953e287f diff --git a/parse.pl b/parse.pl index 2e923a5..ba97090 100755 --- a/parse.pl +++ b/parse.pl @@ -4,51 +4,120 @@ chomp @content; @slide=(); +@topics=(); -print "\n"; -print "\n"; +print "\n\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//>/; + + #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"; + print "\n$_\n"; } else { print "$_\n"; } } 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