Last change
on this file since 2304 was
1961,
checked in by nanardon, 7 years ago
|
Split HTML from POD by man section
|
-
Property svn:executable set to
*
|
File size:
724 bytes
|
Rev | Line | |
---|
[1009] | 1 | #!/bin/env perl |
---|
| 2 | |
---|
| 3 | use strict; |
---|
| 4 | use warnings; |
---|
| 5 | use Pod::Xhtml; |
---|
| 6 | use Pod::Hyperlink::BounceURL; |
---|
| 7 | use Pod::Checker; |
---|
| 8 | |
---|
| 9 | my $linkparser = new Pod::Hyperlink::BounceURL; |
---|
| 10 | $linkparser->configure( URL => './%s.html' ); |
---|
| 11 | |
---|
| 12 | my $parser = new Pod::Xhtml( |
---|
| 13 | LinkParser => $linkparser, |
---|
| 14 | MakeIndex => 1, |
---|
| 15 | ); |
---|
| 16 | |
---|
[1961] | 17 | my $dest = shift(@ARGV); |
---|
[1009] | 18 | |
---|
[1961] | 19 | if (! -d "html/$dest") { |
---|
| 20 | mkdir "html/$dest" || die "Cannot create html/$dest: $!"; |
---|
| 21 | } |
---|
| 22 | |
---|
[1009] | 23 | foreach my $f (@ARGV) { |
---|
| 24 | next if (podchecker($f)); |
---|
| 25 | my $file = $f; |
---|
| 26 | if ($file =~ m/\.pm$/) { |
---|
| 27 | $file =~ s:.*lib/::; |
---|
| 28 | $file =~ s;/+;::;g; |
---|
| 29 | } else { |
---|
| 30 | $file =~ s:^.*/::; |
---|
| 31 | } |
---|
| 32 | $file =~ s:(\.[^\.]+)?$:.html:; |
---|
| 33 | $parser->parse_from_file( |
---|
| 34 | $f, |
---|
[1961] | 35 | "html/$dest/$file", |
---|
[1009] | 36 | ); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.