#!/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/>

=item --ext EXT

Output file extension when processing a directory. Default: C<html>

=item --index NAME

Index file name when processing a directory. Disable with C<0>

=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
