aboutsummaryrefslogtreecommitdiffstats
path: root/tw/task_next_projects.pl
blob: eaa13f80f14a78ac055d0d52457cd6490d876130 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use warnings;
use strict;
use JSON;
use Data::Dumper;

my $json = JSON->new->allow_nonref;

sub pending_work {
    my $tw = qx(task project:w status:pending export);
    my $text = $json->decode( $tw );
    foreach my $h (@{$text}) {
        printf ("%-16s: %s\n", ${$h}{'project'}, ${$h}{'description'});
    }
}

sub pending_home {
    my $tw = qx(task project:h status:pending export);
    my $text = $json->decode( $tw );
    foreach my $h (@{$text}) {
        printf ("%-16s: %s\n", ${$h}{'project'}, ${$h}{'description'});
    }
}

sub sched_today_work {
    my $tw = qx(task project:w status:pending sched:today export);
    my $text = $json->decode( $tw );
    foreach my $h (@{$text}) {
        printf ("%-16s: %s\n", ${$h}{'project'}, ${$h}{'description'});
    }
}

sub due_today_work {
    my $tw = qx(task project:w status:pending due:today export);
    my $text = $json->decode( $tw );
    foreach my $h (@{$text}) {
        printf ("%-16s: %s\n", ${$h}{'project'}, ${$h}{'description'});
    }
}

print "Work Due Today:\n-----\n";
due_today_work();

print "Work Sched Today:\n-----\n";
sched_today_work();

print "Work:\n-----\n";
pending_work();

print "\nHome:\n-----\n";
pending_home();