Move tasks to and from the shelf.
use strict;
use warnings;
use Moo;
use MooseX::MungeHas;
use JSON;
use Clone 'clone';
extends 'Taskwarrior::Kusarigama::Plugin';
with 'Taskwarrior::Kusarigama::
unless $tasks;
foreach my $task (@$tasks) {
my $new = clone $task;
$new->{shelved} = $JSON::true;
$new->{shelf_ts} = time() =~ s/\.\d+$//r unless $task->{shelved};
$self->import_t
less $tasks;
foreach my $task (@$tasks) {
my $new = clone $task;
$new->{ shelved } = $JSON::false;
$self->import_task($new);
}
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Ta