App-OrgUtils
view release on metacpan or search on metacpan
lib/App/ListOrgTodos.pm view on Meta::CPAN
package App::ListOrgTodos;
use 5.010;
use strict;
use warnings;
use Log::ger;
use App::ListOrgHeadlines qw(list_org_headlines);
use Exporter 'import';
use Perinci::Sub::Util qw(gen_modified_sub);
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-01-09'; # DATE
our $DIST = 'App-OrgUtils'; # DIST
our $VERSION = '0.487'; # VERSION
our @EXPORT_OK = qw(list_org_todos);
our %SPEC;
gen_modified_sub(
output_name => 'list_org_todos',
summary => 'List all todo items in all Org files',
base_name => 'App::ListOrgHeadlines::list_org_headlines',
remove_args => ['todo'],
modify_args => {
done => sub { my $as = shift; $as->{schema}[1]{default} = 0 },
sort => sub { my $as = shift; $as->{schema}[1]{default} = 'due_date' },
},
modify_meta => sub {
my $meta = shift;
$meta->{"x.dist.zilla.plugin.rinci.wrap.wrap_args"} = {validate_args=>0, validate_result=>0}; # don't bother checking arguments, they will be checked in list_org_headlines()
},
output_code => sub {
my %args = @_;
$args{done} //= 0;
App::ListOrgHeadlines::list_org_headlines(%args, todo=>1, _raw=>0);
},
);
1;
# ABSTRACT: List all todo items in all Org files
__END__
=pod
=encoding UTF-8
=head1 NAME
App::ListOrgTodos - List all todo items in all Org files
=head1 VERSION
This document describes version 0.487 of App::ListOrgTodos (from Perl distribution App-OrgUtils), released on 2024-01-09.
=head1 SYNOPSIS
# See list-org-todos script
=head1 DESCRIPTION
=head1 FUNCTIONS
=head2 list_org_todos
Usage:
list_org_todos(%args) -> [$status_code, $reason, $payload, \%result_meta]
List all todo items in all Org files.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
=over 4
=item * B<allow_duplicates> => I<bool>
Whether to allow headline to be listed more than once.
This is only relevant when C<group_by_tags> is on. Normally when a headline has
several tags, it will only be listed under its first tag. But when this option
is turned on, the headline will be listed under each of its tag (which mean a
single headline will be listed several times).
=item * B<detail> => I<bool> (default: 0)
( run in 0.786 second using v1.01-cache-2.11-cpan-140bd7fdf52 )