blob: d3db593ce14ebf9fdffee6b9bdbf55834ca2acff (
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
|
use strict;
use warnings;
use JSON;
use Data::Dumper;
# a test hook in Perl for taskwarrior
# this must be JSON - this gets passed in my taskwarrior
my $added_task = <STDIN>;
my $hashref = decode_json $added_task;
my $original_description = $hashref->{description};
my $tags = $hashref->{tags};
print $tags->[1];
print "\n";
print Dumper($hashref);
$hashref->{description} =~ s/LEMON/BOLLOCKS/g;
my $output = encode_json $hashref;
# print $hashref->{"status"};
# print "\n";
# print $hashref->{scheduled};
print $output;
exit 0;
|