App-OrgUtils

 view release on metacpan or  search on metacpan

script/list-org-anniversaries  view on Meta::CPAN

use strict;
use warnings;

use Perinci::CmdLine::Any;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-01-09'; # DATE
our $DIST = 'App-OrgUtils'; # DIST
our $VERSION = '0.487'; # VERSION

binmode STDOUT, ":encoding(utf8)";
Perinci::CmdLine::Any->new(
    url => '/App/ListOrgAnniversaries/list_org_anniversaries')->run;

1;
# ABSTRACT: List all anniversaries in Org files
# PODNAME: list-org-anniversaries

__END__

=pod

script/list-org-headlines  view on Meta::CPAN

use strict;
use warnings;

use Perinci::CmdLine::Any;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-01-09'; # DATE
our $DIST = 'App-OrgUtils'; # DIST
our $VERSION = '0.487'; # VERSION

binmode STDOUT, ":encoding(utf8)";
Perinci::CmdLine::Any->new(url=>'/App/ListOrgHeadlines/list_org_headlines')->run;

1;
# ABSTRACT: List all headlines in all Org files
# PODNAME: list-org-headlines

__END__

=pod

script/list-org-priorities  view on Meta::CPAN

    }

    my $resmeta = {};
    if ($args{detail}) {
        $resmeta->{'table.fields'} = [qw/priority order/];
    }

    [200, "OK", \@res, $resmeta];
}

binmode STDOUT, ":encoding(utf8)";
Perinci::CmdLine::Any->new(url=>'/main/list_org_priorities')->run;

1;
# ABSTRACT: List all priorities defined in all Org files
# PODNAME: list-org-priorities

__END__

=pod

script/list-org-tags  view on Meta::CPAN

    }

    my $resmeta = {};
    if ($args{detail}) {
        $resmeta->{'table.fields'} = [qw/tag occurences/];
    }

    [200, "OK", \@res, $resmeta];
}

binmode STDOUT, ":encoding(utf8)";
Perinci::CmdLine::Any->new(url=>'/main/list_org_tags')->run;

1;
# ABSTRACT: List all headline tags found in all Org files
# PODNAME: list-org-tags

__END__

=pod

script/list-org-todo-states  view on Meta::CPAN

    }

    my $resmeta = {};
    if ($args{detail}) {
        $resmeta->{'table.fields'} = [qw/state is_done/];
    }

    [200, "OK", \@res, $resmeta];
}

binmode STDOUT, ":encoding(utf8)";
Perinci::CmdLine::Any->new(url=>'/main/list_org_todo_states')->run;

1;
# ABSTRACT: List all todo states in all Org files
# PODNAME: list-org-todo-states

__END__

=pod

script/list-org-todos  view on Meta::CPAN

use strict;
use warnings;

use Perinci::CmdLine::Any;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-01-09'; # DATE
our $DIST = 'App-OrgUtils'; # DIST
our $VERSION = '0.487'; # VERSION

binmode STDOUT, ":encoding(utf8)";
Perinci::CmdLine::Any->new(url => '/App/ListOrgTodos/list_org_todos')->run;

1;
# ABSTRACT: List all todo items in all Org files
# PODNAME: list-org-todos

__END__

=pod

script/org2html  view on Meta::CPAN


    if ($backend eq 'emacs') {

        require File::Slurper;
        require File::Temp;
        require IPC::System::Options;

        my ($tempfh, $tempfname) = File::Temp::tempfile(
            "XXXXXXXX", SUFFIX=>".org", TMPDIR=>1);
        if ($args{input_filename} eq '-') {
            binmode STDIN, ":encoding(utf8)";
            print $tempfh <STDIN>;
        } else {
            print $tempfh File::Slurper::read_text($args{input_filename});
        }
        (my $temporgfname = $tempfname) =~ s/\.org\z/.html/;

        my $output;
        IPC::System::Options::system(
            {die=>1, log=>1, capture_merged=>\$output},
            "emacs", $tempfname, "--batch", "-f", "org-html-export-to-html", "--kill",

script/org2html  view on Meta::CPAN

            return [200, "OK", File::Slurper::read_text($temporgfname)];
        }

        # backend emacs
    } elsif ($backend eq 'Org::To::HTML') {

        my %oth_args; # args to feed to org_to_html function
        if ($args{input_filename} eq '-') {
            $oth_args{source_str} = do {
                local $/;
                binmode STDIN, ":encoding(utf8)";
                scalar <STDIN>;
            };
        } else {
            $oth_args{source_file} = $args{input_filename};
        }

        $oth_args{ignore_unknown_settings} = 1;
        #$oth_args{naked} = $args{naked};
        #$oth_args{html_title} = $args{title} if defined $args{title};

script/org2html-wp  view on Meta::CPAN

        },
    },
};
sub app {
    my %args = @_;

    my %oth_args; # args to feed to org_to_html function
    if ($args{input_filename} eq '-') {
        $oth_args{source_str} = do {
            local $/;
            binmode STDIN, ":encoding(utf8)";
            scalar <STDIN>;
        };
    } else {
        $oth_args{source_file} = $args{input_filename};
    }

    $oth_args{ignore_unknown_settings} = 1;
    $oth_args{naked} = $args{naked};
    $oth_args{html_title} = $args{title} if defined $args{title};

t/00-compile.t  view on Meta::CPAN

for my $lib (@module_files)
{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-e', "require q[$lib]"))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
        and not eval { +require blib; blib->VERSION('1.01') };

    if (@_warnings)
    {
        warn @_warnings;

t/00-compile.t  view on Meta::CPAN

    close $fh and skip("$file uses -T; not testable with PERL5LIB", 1)
        if grep { $_ eq '-T' } @switches and $ENV{PERL5LIB};

    my $stderr = IO::Handle->new;

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-c', $file))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$file compiled ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
        and not eval { +require blib; blib->VERSION('1.01') };

    # in older perls, -c output is simply the file portion of the path being tested
    if (@_warnings = grep { !/\bsyntax OK$/ }
        grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings)



( run in 0.578 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )