X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;h=ba9709040786c0e1f35ffd3654117e490fc7ac09;hp=d5695f2bca4301ca1e65d03079a4434c381597ea;hb=HEAD;hpb=eb023953800bf39d877b402bb4300fa8f02486ab diff --git a/parse.pl b/parse.pl index d5695f2..ba97090 100755 --- a/parse.pl +++ b/parse.pl @@ -4,30 +4,94 @@ 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$_\n"; } @@ -36,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