X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installhtml;h=053858d790e77a0bb5396a318906576f9f79e847;hb=54fbcc6e8ef8d379545ca2bc110f2f19a7c73715;hp=b677cc29dbc77b9d1d6d0705d9d01e4ce5a89935;hpb=90248788f819cf7b59aabb5259fdd6d66bc4632b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installhtml b/installhtml index b677cc2..053858d 100755 --- a/installhtml +++ b/installhtml @@ -63,13 +63,13 @@ a URL. The default is `/'. =item B<--splithead> POD files to split on =head directive -Colon-separated list of pod files to split by the =head directive. The +Comma-separated list of pod files to split by the =head directive. The .pod suffix is optional. These files should have names specified relative to podroot. =item B<--splititem> POD files to split on =item directive -Colon-separated list of all pod files to split by the =item directive. +Comma-separated list of all pod files to split by the =item directive. The .pod suffix is optional. I does not do the actual split, rather it invokes I to do the dirty work. As with --splithead, these files should have names specified relative to podroot. @@ -80,7 +80,7 @@ The directory containing the splitpod program. The default is `podroot/pod'. =item B<--libpods> library PODs for LEE links -Colon-separated list of "library" pod files. This is the same list that +Comma-separated list of "library" pod files. This is the same list that will be passed to pod2html when any pod is converted. =item B<--verbose> verbose output @@ -100,7 +100,7 @@ perl documentation: --htmlroot=/perl/nmanual \ --splithead=pod/perlipc \ --splititem=pod/perlfunc \ - --libpods=perlfunc:perlguts:perlvar:perlrun:perlop \ + --libpods=perlfunc,perlguts,perlvar,perlrun,perlop \ --recurse \ --verbose @@ -291,11 +291,13 @@ sub absolute_path { sub create_index { my($html, $dir) = @_; my(@files, @filedata, @index, $file); + my($lcp1,$lcp2); + # get the list of .html files in this directory opendir(DIR, $dir) || die "$0: error opening directory $dir for reading: $!\n"; - @files = sort(grep(/\.html$/, readdir(DIR))); + @files = sort(grep(/\.html?$/, readdir(DIR))); closedir(DIR); open(HTML, ">$html") || @@ -314,17 +316,20 @@ sub create_index { # pull out the NAME section ($name) = grep(/NAME=/, @filedata); - $name =~ m,/H1>\s(\S+)\s[\s-]*(.*?)\s*$,sm; + ($lcp1,$lcp2) = ($name =~ m,/H1>\s(\S+)\s[\s-]*(.*?)\s*$,sm); + if (defined $lcp1 and $lcp1 eq '

') { # Uninteresting. Try again. + ($lcp1,$lcp2) = ($name =~ m,/H1>\s

\s(\S+)\s[\s-]*(.*?)\s*$,sm); + } print HTML qq(); - print HTML "

$1
$2\n" if defined $1; -# print HTML qq($1
\n") if defined $1; + print HTML "
$lcp1
$lcp2\n" if defined $lcp1; +# print HTML qq($lcp1
\n") if defined $lcp1; next; @index = grep(/.*/s, @filedata); for (@index) { - s/(\s*\s*)/$2/s; + s/(\s*\s*)/$lcp2/s; s,#,$dir/$file#,g; # print HTML "$_\n"; print HTML "$_\n


\n";