| 1 |
#!/usr/bin/perl -w |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
|
| 6 |
our $VERSION = '0.53'; # VERSION |
| 7 |
|
| 8 |
use Getopt::Long; |
| 9 |
use Pod::Usage; |
| 10 |
use Pod::ProjectDocs; |
| 11 |
|
| 12 |
my ( |
| 13 |
$out, $lib, $title, $lang, $desc, |
| 14 |
$index, $verbose, $forcegen, $nosourcecode, $except |
| 15 |
); |
| 16 |
my $help = @ARGV == 0; |
| 17 |
|
| 18 |
my %opt = ( |
| 19 |
'help|?' => \$help, |
| 20 |
'out|o=s' => \$out, |
| 21 |
'lib|l=s@' => \$lib, |
| 22 |
'except|e=s@' => \$except, |
| 23 |
'title|t=s' => \$title, |
| 24 |
'desc|d=s' => \$desc, |
| 25 |
'index!' => \$index, |
| 26 |
'verbose|v' => \$verbose, |
| 27 |
'forcegen!' => \$forcegen, |
| 28 |
'nosourcecode!' => \$nosourcecode, |
| 29 |
'lang=s' => \$lang, |
| 30 |
); |
| 31 |
|
| 32 |
GetOptions(%opt); |
| 33 |
|
| 34 |
pod2usage(1) if $help; |
| 35 |
|
| 36 |
my $p = Pod::ProjectDocs->new( |
| 37 |
outroot => $out, |
| 38 |
libroot => $lib, |
| 39 |
except => $except, |
| 40 |
title => $title, |
| 41 |
desc => $desc, |
| 42 |
index => $index, |
| 43 |
verbose => $verbose, |
| 44 |
forcegen => $forcegen, |
| 45 |
nosourcecode => $nosourcecode, |
| 46 |
lang => $lang, |
| 47 |
); |
| 48 |
$p->gen(); |
| 49 |
|
| 50 |
=encoding utf-8 |
| 51 |
|
| 52 |
=head1 NAME |
| 53 |
|
| 54 |
pod2projdocs - generates CPAN like project documents from pod. |
| 55 |
|
| 56 |
=head1 SYNOPSIS |
| 57 |
|
| 58 |
pod2projdocs [options] |
| 59 |
|
| 60 |
Options: |
| 61 |
-help display this help and exist |
| 62 |
-out directory path that you want to generate documents into |
| 63 |
-lib your project's library-root-directory path |
| 64 |
-title your project's title |
| 65 |
-desc your project's description |
| 66 |
-noindex don't create index for all generated pages |
| 67 |
-forcegen generate documents each time, ignoring last modified timestamp |
| 68 |
-nosourcecode suppress inclusion of the original source code in the generated output |
| 69 |
-lang set this language as xml:lang (default 'en') |
| 70 |
-except the files matches this regex won't be parsed |
| 71 |
|
| 72 |
You can set each option with their first character, |
| 73 |
for example, you can write -o instead of -out. |
| 74 |
|
| 75 |
And you can generate documents from multiple library directories. |
| 76 |
|
| 77 |
pod2projdocs -o /path/to/outputdir -l /path/to/lib1 -l /path/to/lib2 |
| 78 |
|
| 79 |
=head1 DESCRIPTION |
| 80 |
|
| 81 |
generates CPAN like project documents from pod. |
| 82 |
|
| 83 |
=head1 SEE ALSO |
| 84 |
|
| 85 |
L<Pod::ProjectDocs> |
| 86 |
|
| 87 |
=head1 AUTHORS |
| 88 |
|
| 89 |
=over 4 |
| 90 |
|
| 91 |
=item Lyo Kato E<lt>[email protected]<gt> |
| 92 |
|
| 93 |
=item L<Martin Gruner|https://github.com/mgruner> (current maintainer) |
| 94 |
|
| 95 |
=back |
| 96 |
|
| 97 |
=head1 COPYRIGHT AND LICENSE |
| 98 |
|
| 99 |
=over 4 |
| 100 |
|
| 101 |
=item © 2005 by Lyo Kato |
| 102 |
|
| 103 |
=item © 2018 by Martin Gruner |
| 104 |
|
| 105 |
=back |
| 106 |
|
| 107 |
This library is free software; you can redistribute it and/or modify |
| 108 |
it under the same terms as Perl itself, either Perl version 5.8.5 or, |
| 109 |
at your option, any later version of Perl 5 you may have available. |
| 110 |
|
| 111 |
=cut |