summaryrefslogtreecommitdiff
path: root/bin/pod2x
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pod2x')
-rwxr-xr-xbin/pod2x29
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/pod2x b/bin/pod2x
new file mode 100755
index 000000000..2c10a30d0
--- /dev/null
+++ b/bin/pod2x
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+#use Pod::Text;
+#$Pod::Text::termcap=1;
+
+my $site_perl = "./FS";
+#my $catman = "./catman";
+#my $catman = "./htdocs/docs/man";
+my $html = "./htdocs/docs/man";
+
+$|=1;
+
+die "Can't find $site_perl and $catman"
+ unless [ -d $site_perl ] && [ -d $catman ] && [ -d $html ];
+
+foreach my $file (
+ glob("$site_perl/*.pm"),
+ glob("$site_perl/*/*.pm"),
+ glob("$site_perl/*/*/*.pm")
+) {
+ #$file =~ /\/([\w\-]+)\.pm$/ or die "oops file $file";
+ $file =~ /$site_perl\/(.*)\.pm$/ or die "oops file $file";
+ my $name = $1;
+ print "$name\n";
+ my $htmlroot = join('/', map '..',1..(scalar($file =~ tr/\///)-2)) || '.';
+# system "pod2text $file >$catman/$name.txt";
+ system "pod2html --podroot=$site_perl --podpath=./FS:./FS/UI:. --norecurse --htmlroot=$htmlroot $file >$html/$name.html";
+# system "pod2html $file >$html/$name.html";
+}