Enlightenment CVS committal

Author  : handyande
Project : e17
Module  : apps/e

Dir     : e17/apps/e/data/other


Modified Files:
        parse_todo.pl 


Log Message:
shorne latest TODO parser, I _really_ will get this on the site soon, but I may 
get the wedding out of the way first ;)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/data/other/parse_todo.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- parse_todo.pl       27 Jun 2005 15:52:58 -0000      1.4
+++ parse_todo.pl       28 Jun 2005 12:48:48 -0000      1.5
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-my $TODO;
+use strict;
 
 my $new_item = 0;
 my $in_body  = 0;
@@ -34,21 +34,22 @@
                }
        } elsif (/^\* /) {
                if ($in_body ) {
-                       $_ =~ s/^\* //;
-                       push(@{$todo_hash{$title}}, $item);
-                       $item = {};
-                       $item->{'asignee'} = "Unknown";
-                       $item->{'task'} = $_ ;
-                       if(/<(.*)>/) {
-                               my $email = $1;
-                               if ($email =~ /(.*) AT /) {                     
+                       if ($item->{'task'}) {
+                               my $task = $item->{'task'};
+                               $task =~ s/^\* //;
+                               if ($task =~ s/<(.*)>//) {
+                                       $item->{'asignee_email'} = $1;
+                                       $1 =~ /(.*) AT /;
                                        $item->{'asignee'} = $1;
-                                       $item->{'asignee_email'} = $email;
                                } else {
-                                       $item->{'asignee'} = $email;
                                        $item->{'asignee_email'} = 0;
+                                       $item->{'asignee'} = 'None';
                                }
+                               $item->{'task'} = $task;
+                               push(@{$todo_hash{$title}}, $item);
                        }
+                       $item = {};
+                       $item->{'task'} = $_ ;
                }
        } else {
                if ($in_body) {
@@ -56,9 +57,6 @@
                                $title = $_;
                        } else {
                                $item->{'task'} = $item->{'task'} . $_ ;
-                               if(/<(.*)>/) {
-                                       $item->{'asignee'} = $1;
-                               }
                        }
                }
        }
@@ -66,11 +64,11 @@
 }
 
 for $title ( keys %todo_hash ) {
-
+       my $count = 1;
        print "<h2>" . $title . "</h2>\n";
 
        print "<table>\n";
-       print "    <tr><td>Asignee</td><td>Task</td></tr>\n";
+       print "    <tr><td>#</td><td>Asignee</td><td>Task</td></tr>\n";
        for $item ( @{$todo_hash{$title}} ) {
                my $asignee_email = $item->{'asignee_email'};
                my $asignee = $item->{'asignee'};
@@ -83,7 +81,8 @@
                } else {
                     $mailto = $asignee;
                }
-               print "    <tr><td>$mailto</td><td>$task</td></tr>\n";
+               print "    
<tr><td>$count</td><td>$mailto</td><td>$task</td></tr>\n";
+               $count++;
        }
        print "</table>\n";
 }




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to