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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
#!/usr/bin/env perl
use strict;
require 5.010;
my $VERSION = '0.345.0';
use App::pod2pandoc;
pod2pandoc( App::pod2pandoc::parse_arguments(@ARGV) );
=head1 NAME
pod2pandoc - convert Pod to Pandoc document model
=head1 SYNOPSIS
pod2pandoc [OPTIONS] {INPUT} [ [ -- ] PANDOC_ARGUMENTS ]
pod2pandoc Module.pm -o Module.pdf
pod2pandoc script.pl -t markdown
pod2pandoc Module::Name -o Module-Name.html
pod2pandoc lib/ wiki/ --ext .md --wiki --index Home -t markdown_github
pod2pandoc lib/ docs/ --standalone
=head1 DESCRIPTION
pod2pandoc converts "Plain Old Documentation" format (aka Pod, see L<perlpod>)
to the L<Pandoc|http://pandoc.org/> document model for further processing to
other document formats (HTML, Markdown, LaTeX, PDF, EPUB, docx, ODT, man...).
By default or with input C<-> a document is read from STDIN. Multiple input
files are combined to one document and listed in document metadata field
C<file>. The result is printed in JSON format or passed to Pandoc if
additional options such as C<-t> or C<-o> are given.
To process a whole directory of C<.pm> and/or C<.pod> files, specify an input
directory as first input and an optional output directory as second.
=head1 OPTIONS
=over
=item --help|-h|-?
Print out usage information and exit.
=item --parse FORMATS
Parse and include data sections. Use C<*> for all.
=item --podurl URL
Base URL to Perl modules. Default: C<https://metacpan.org/pod/>. A false value
such as C<0> or C<""> will disable linking to external modules.
=item --ext EXT
Output file extension when processing a directory. Default: C<html>.
=item --index NAME
Index file (e.g. C<index.html>) name when processing a directory. Can be
disabled with C<0>.
=item --name
Include C<NAME> section which is removed by default.
=item --wiki
Create wikilinks when processing a directory.
=item --update
Only process when input file is newer then output file.
=item --default-meta FILE
Read default metadata from given file.
=item --quiet
Don't emit warnings and status information.
=item ...
Additional options are passed through to pandoc executable.
=back
=head1 SEE ALSO
This script is part of L<Pod::Pandoc> and implemented in L<App::pod2pandoc>.
Together with Pandoc document converter it can be used as customizable
replacement for specialized Pod converter scripts such as L<pod2html>,
L<pod2projdocs>, L<pod2man>, L<pod2readme>, L<pod2usage>, L<pod2latex>,
L<pod2markdown>, L<pod2text>, and L<pod2projdocs>.
=cut
|