diff options
Diffstat (limited to 'tw/task_next_projects.pl')
-rw-r--r-- | tw/task_next_projects.pl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tw/task_next_projects.pl b/tw/task_next_projects.pl new file mode 100644 index 0000000..d87d8a4 --- /dev/null +++ b/tw/task_next_projects.pl @@ -0,0 +1,30 @@ +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'}); + } +} + + +print "Work:\n-----\n"; +pending_work(); + + +print "\nHome:\n-----\n"; +pending_home(); |