Debian Codegraph @

script/pod2pandoc

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