inhalt
[lectures/dfb-slides.git] / parse.pl
index a06ff05..df1e306 100755 (executable)
--- a/parse.pl
+++ b/parse.pl
@@ -26,10 +26,23 @@ print "<slides bgcolor=\"#222266\" fgcolor=\"#9999ff\"
 foreach(@content) {
        if((/^\d/) or (/^ \d/)) {
                push(@topics,$_);
-               #print STDERR "$_\n";
        }
 }
 
+print "<slide effect=\"slide top left, blend\">\n";
+print "<header size=\"20\" fgcolor=\"#22FF22\">Inhalt</header>\n<text></text>\n";
+foreach(@topics) {
+       if(/^\d/) {
+               print "<text></text>\n";
+               $add="fgcolor=\"#ff00cc\"";
+       }
+       else {
+               $add="";
+       }
+       print "<text $add>$_</text>\n";
+}
+print "</slide>\n";
+
 $topic=0;
 
 push(@content," 23");
@@ -50,8 +63,22 @@ foreach(@content) {
        # unterpunkt
        if(/^ \d/) {
                if(@slide) {
-                       print "<slide>\n";
-                       print STDERR "$topics[$topic]\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 "<slide$action>\n";
+                       print STDERR "$topics[$topic] $action\n";
                        print "<header size=\"20\" fgcolor=\"#22FF22\">$topics[$topic]</header>\n<text></text>\n";
                        foreach(@slide) {
                                if(/^  \+ /) {