Enlightenment CVS committal

Author  : handyande
Project : e17
Module  : apps/e

Dir     : e17/apps/e/data/other


Modified Files:
        parse_todo.pl 


Log Message:
shorne whaddya on? :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/data/other/parse_todo.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- parse_todo.pl       28 Jun 2005 12:48:48 -0000      1.5
+++ parse_todo.pl       29 Jun 2005 13:22:04 -0000      1.6
@@ -17,13 +17,36 @@
 my $title;
 my $item = {};
 
+# use globals
+sub push_item {
+       if ($item->{'task'}) {
+               my $task = $item->{'task'};
+               $task =~ s/^\* //;
+               if ($task =~ s/<(.*)>//) {
+                       $item->{'asignee_email'} = $1;
+                       $1 =~ /(.*) AT /;
+                       $item->{'asignee'} = $1;
+               } else {
+                       $item->{'asignee_email'} = 0;
+                       $item->{'asignee'} = 'None';
+               }
+               $item->{'task'} = $task;
+               push(@{$todo_hash{$title}}, $item);
+       }
+}
+
 while(<>) {
        chomp;    
 
        if(/\[\[\[/) {
+               $item->{'task'} = 0;
                $in_body = 1;
        } elsif (/\]\]\]/) {
-               $in_body = 0;
+               if ($in_body) {
+                       push_item;
+                       $item = {};
+                       $in_body = 0;
+               }
        } elsif (/^---.*---$/) {
                if ($in_body) {
                        if($is_title) {
@@ -34,20 +57,7 @@
                }
        } elsif (/^\* /) {
                if ($in_body ) {
-                       if ($item->{'task'}) {
-                               my $task = $item->{'task'};
-                               $task =~ s/^\* //;
-                               if ($task =~ s/<(.*)>//) {
-                                       $item->{'asignee_email'} = $1;
-                                       $1 =~ /(.*) AT /;
-                                       $item->{'asignee'} = $1;
-                               } else {
-                                       $item->{'asignee_email'} = 0;
-                                       $item->{'asignee'} = 'None';
-                               }
-                               $item->{'task'} = $task;
-                               push(@{$todo_hash{$title}}, $item);
-                       }
+                       push_item;
                        $item = {};
                        $item->{'task'} = $_ ;
                }
@@ -77,7 +87,7 @@
                my $mailto;
 
                if ($asignee_email) {
-                    $mailto = "<a href='mailto:$asignee_email'>$asignee</a>"   
+                    $mailto = "<a href='mailto://$asignee_email'>$asignee</a>" 
                } else {
                     $mailto = $asignee;
                }




-------------------------------------------------------
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