diff options
Diffstat (limited to 'tw/task_capture_completed.pl')
-rw-r--r-- | tw/task_capture_completed.pl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tw/task_capture_completed.pl b/tw/task_capture_completed.pl new file mode 100644 index 0000000..a478ba1 --- /dev/null +++ b/tw/task_capture_completed.pl @@ -0,0 +1,33 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use autodie; +use feature qw(say); + +my $project = $ARGV[0]; + +my @tw_output = qx/task status:completed project:$project all/; + +# print "$_\n" foreach @x; + +my %tasks; +my $id; + + +foreach my $line (@tw_output) { + my @data = split / /, $line; + if (defined($data[4])) { + if ($data[4] =~ /\S{8}/) { + $tasks{$data[4]} = ( + [`task _get $data[4].description`, + `task _get $data[4].end`] + ) + } + } +} + +while ( (my $key, my $value) = each %tasks ) { + print "$key => @{ $value }\n"; +} + |