mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Export
- Added export-html.pl. - Added error handling to export scripts.
This commit is contained in:
parent
8a7f1e03c7
commit
10e3f306dd
7 changed files with 150 additions and 4 deletions
|
@ -28,10 +28,23 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use JSON;
|
||||
|
||||
# Give a nice error if the (non-standard) JSON module is not installed.
|
||||
eval "use JSON";
|
||||
if ($@)
|
||||
{
|
||||
print "Error: You need to install the JSON Perl module.\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
||||
# Use the taskwarrior 1.9.4+ _query command to issue a query and return JSON
|
||||
my $command = '/usr/local/bin/task _query ' . join (' ', @ARGV);
|
||||
if ($command =~ /No matches/)
|
||||
{
|
||||
print stderr $command;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Generate output.
|
||||
print "%YAML 1.1\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue