-
Notifications
You must be signed in to change notification settings - Fork 8
/
todo
executable file
·32 lines (27 loc) · 869 Bytes
/
todo
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
#!/usr/bin/perl
#-----------------------------------#
# Written by Nic H #
# Modified by Chris B #
#-----------------------------------#
# Place "rtm" in /sbin and chmod 755 for system-wide usage
# or replace rtm command with path variable
# my $path = "/*path*/rtm";
use strict;
use warnings;
my @tasks = (
[ "Overdue", "'dueBefore:today AND status:incomplete'" ],
[ "Today", "'due:today AND status:incomplete'" ],
[ "Tomorrow", "'due:tomorrow AND status:incomplete'" ],
[ "Next 7 Days", "'dueWithin:\"1 week\" AND dueAfter:tomorrow AND status:incomplete'" ],
[ "Other", "'due:never AND status:incomplete'" ],
# [ "Completed Recently", "'status:completed AND completedWithin:\"1 week of today\"'" ],
);
my $i = 0;
foreach(@tasks){
my $task = `rtm --filter $tasks[$i][1]`;
if($task){
print "- $tasks[$i][0] - \n";
print "$task\n";
}
$i++;
}