blob: 4c907ef90535eb190d0af411b0e7d47668964861 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/env perl
# this script is used to pipe an email from aerc using pipe -m ./aerc2task.pl to taskwarrior
foreach my $line (<STDIN>) {
chomp;
if ($line =~ /^Subject/) {
print "Received: $line\n";
my @task_split = split(/Subject: /, $line);
$task = @task_split[1];
$task =~ s/TASK//g;
$task =~ s/WATCH//g;
print "So task is: $task\n";
`task add $task`
}
}
|