ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/genhelp.pl
Revision: 1.2
Committed: Fri Sep 8 03:08:21 2006 UTC (17 years, 8 months ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: rel-2_0, STABLE
Changes since 1.1: +3 -3 lines
Log Message:
Also generate wizhelp

File Contents

# User Rev Content
1 pippijn 1.1 #!/usr/bin/perl
2    
3 pippijn 1.2 # $Id: genhelp.pl,v 1.1 2006-09-08 01:54:26 pippijn Exp $
4 pippijn 1.1
5     use strict;
6     use warnings;
7     use Pod::POM;
8     use Pod::POM::View::Text;
9    
10     my $pom = Pod::POM->new();
11     my $pod = $pom->parse_file($ARGV[0]);
12    
13 pippijn 1.2 foreach my $head1 (grep { /Command/ } $pod->head1()) {
14 pippijn 1.1 my $i = 0;
15     my @command;
16     foreach my $head2 ($head1->head2) {
17     ($command[$i], undef) = split ' ', $head2->title;
18     if ($command[$i] =~ /^X</) {
19     (undef, $command[$i]) = split '>', $command[$i];
20     }
21 pippijn 1.2 open (HELP, ">".$ARGV[1]."/".$command[$i]);
22 pippijn 1.1 my $content = $head2->present('Pod::POM::View::Text');
23     print HELP $content;
24     close HELP;
25     $i++;
26     }
27     }