aboutsummaryrefslogtreecommitdiffstats
path: root/task_capture_completed.pl
blob: a478ba1b77008cfb541aa0a7988abf376f9eb175 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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";
}