[Bps-public-commit] r10808 - in Net-Hiveminder: lib/Net

sartak at bestpractical.com sartak at bestpractical.com
Mon Feb 11 20:30:54 EST 2008


Author: sartak
Date: Mon Feb 11 20:30:51 2008
New Revision: 10808

Modified:
   Net-Hiveminder/   (props changed)
   Net-Hiveminder/Changes
   Net-Hiveminder/Makefile.PL
   Net-Hiveminder/lib/Net/Hiveminder.pm

Log:
 r51775 at onn:  sartak | 2008-02-11 20:30:43 -0500
 todo, create_task and braindump now use filters so you can have .hm files in
 your directories to have filters applied


Modified: Net-Hiveminder/Changes
==============================================================================
--- Net-Hiveminder/Changes	(original)
+++ Net-Hiveminder/Changes	Mon Feb 11 20:30:51 2008
@@ -1,5 +1,9 @@
 Revision history for Net-Hiveminder
 
+0.05
+        todo, create_task and braindump now use filters so you can have .hm
+            files in your directories to have filters applied
+
 0.04    Thu Feb 07 08 21:17:59
         Add new scripts: todo, create, done
         Fix undef warning in download_text

Modified: Net-Hiveminder/Makefile.PL
==============================================================================
--- Net-Hiveminder/Makefile.PL	(original)
+++ Net-Hiveminder/Makefile.PL	Mon Feb 11 20:30:51 2008
@@ -3,7 +3,7 @@
 name            'Net-Hiveminder';
 all_from        'lib/Net/Hiveminder.pm';
 
-requires        'Net::Jifty' => '0.04';
+requires        'Net::Jifty' => '0.06';
 requires        'Number::RecordLocator';
 
 features(

Modified: Net-Hiveminder/lib/Net/Hiveminder.pm
==============================================================================
--- Net-Hiveminder/lib/Net/Hiveminder.pm	(original)
+++ Net-Hiveminder/lib/Net/Hiveminder.pm	Mon Feb 11 20:30:51 2008
@@ -53,6 +53,10 @@
     default => "$ENV{HOME}/.hiveminder",
 );
 
+has '+filter_file' => (
+    default => ".hm",
+);
+
 =head2 display_tasks [ARGS], TASKS
 
 This will take a list of hash references, C<TASKS>, and convert each to a
@@ -182,6 +186,8 @@
         starts_before    => 'tomorrow',
         depends_on_count => 0,
 
+        %{ $self->filter_config },
+
         # XXX: this is one place to improve the API
 
         @_
@@ -213,7 +219,7 @@
     my $self    = shift;
     my $summary = shift;
 
-    $self->create(Task => summary => $summary);
+    $self->create(Task => summary => $summary, %{ $self->filter_config });
 }
 
 =head2 read_task LOCATOR
@@ -365,6 +371,8 @@
         $tokens = join ' ', @$tokens;
     }
 
+    $tokens .= ' ' . join ' ', %{ $self->filter_config };
+
     my $ret = $self->act('ParseTasksMagically', text => $text, tokens => $tokens);
     if ($args{returns} eq 'ids') {
         return @{ $ret->{content}->{ids} || [] };



More information about the Bps-public-commit mailing list