1#!/usr/bin/perl -w
2
3eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}' if 0;
4
5use strict;
6use Getopt::Long;
7use Pod::Usage;
8use Pod::ProjectDocs;
9
10my($out, $lib, $title, $lang, $desc, $charset, $index, $verbose, $forcegen, $except);
11my $help = @ARGV == 0;
12
13my %opt = (
14    'help|?'      => \$help,
15    'out|o=s'     => \$out,
16    'lib|l=s@'    => \$lib,
17    'except|e=s@' => \$except,
18    'title|t=s'   => \$title,
19    'desc|d=s'    => \$desc,
20    'charset|c=s' => \$charset,
21    'index!'      => \$index,
22    'verbose|v'   => \$verbose,
23    'forcegen!'   => \$forcegen,
24    'lang=s'      => \$lang,
25);
26
27GetOptions(%opt);
28
29pod2usage(1) if $help;
30
31my $p = Pod::ProjectDocs->new(
32    outroot  => $out,
33    libroot  => $lib,
34    except   => $except,
35    title    => $title,
36    desc     => $desc,
37    charset  => $charset,
38    index    => $index,
39    verbose  => $verbose,
40    forcegen => $forcegen,
41    lang     => $lang,
42);
43$p->gen;
44
45=head1 NAME
46
47pod2projdocs - ganerates CPAN like project documents from pod.
48
49=head1 SYNOPSIS
50
51pod2projdocs [options]
52
53 Options:
54    -help        display this help and exists
55    -out         directory path that you want to generate documents into
56    -lib         your project's library-root-directory path
57    -title       your project's title
58    -desc        your project's description
59    -charset     this is used in meta tag in html. default 'UTF-8'
60    -noindex     don't create index on each pod pages.
61    -forcegen    generate documents each time ignoring last modified timestamp
62    -lang        set this language as xml:lang. default 'en'
63    -except      set regex, and the file matches this regex won't be checked
64
65 you can set each options with their first alphabet.
66 for example, you can write -o instead of -out.
67
68 And you can make documents from multiple library-directories.
69
70  pod2projdocs -o /path/to/outputdir -l /path/to/lib1 -l /path/to/lib2
71
72=head1 DESCRIPTION
73
74generates CPAN like project documents from pod.
75
76=head1 SEE ALSO
77
78L<Pod::ProjectDocs>
79
80=head1 AUTHOR
81
82Lyo Kato E<lt>lyo.kato@gmail.comE<gt>
83
84=head1 COPYRIGHT AND LICENSE
85
86Copyright 2005 Lyo Kato. All rights reserved.
87
88This library is free software. You can redistribute it and/or modify it under
89the same terms as perl itself.
90
91=cut
92
93