X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=parse.pl;h=ba9709040786c0e1f35ffd3654117e490fc7ac09;hp=0dbf9a076a416c20e144bcd4a952b5f5680309a5;hb=HEAD;hpb=56d4b0f73d20f1104a304573aac565db10446262 diff --git a/parse.pl b/parse.pl index 0dbf9a0..ba97090 100755 --- a/parse.pl +++ b/parse.pl @@ -4,6 +4,7 @@ chomp @content; @slide=(); +@topics=(); @actions=( "", "slide top", @@ -16,26 +17,44 @@ chomp @content; "slide right"); print "\n"; -print "\n"; -@topics=(); +open(IN,"../head2xml header|") or die "no head2xml / header!!\n"; +while() { + print $_; +} +close(IN); foreach(@content) { if((/^\d/) or (/^ \d/)) { push(@topics,$_); - #print STDERR "$_\n"; } } +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//>/; @@ -50,14 +69,27 @@ foreach(@content) { # unterpunkt if(/^ \d/) { if(@slide) { - print "\n"; - pop(@slide); - print STDERR "$topics[$topic]\n"; - print "
$topics[$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(/^ \+ /) { s/\+//; - print "\n$_\n"; + print "\n$_\n"; } elsif(/ \+ /) { s/\+//; @@ -86,5 +118,6 @@ foreach(@content) { push(@slide,$_); } } +} print "
\n"; \ No newline at end of file