4 -d
"html" and system("rm -rf html");
5 mkdir "html", 0777 or die $!;
6 mkdir "html/Search", 0777 or die $!;
9 pod2html
('Xapian.pm', 'html/Search/Xapian.html');
10 mkdir "html/Search/Xapian", 0777 or die $!;
11 for my $f (<Xapian
/*.pm
>) {
14 pod2html
($f, "html/Search/$o");
17 for (sort keys %pages) {
20 print "$_ has a POD but is never linked to\n";
21 } elsif ($v =~ /^N=/) {
22 print "$_ has no POD but is linked to\n";
24 # print "$_ has no POD (but no links)\n";
30 my $tmp = 'pod2html.tmp';
32 $root = 'Xapian' if $out =~ m!/Xapian\.html$!;
35 open POD
, $in or die $!;
47 $class = "Search::$class";
49 open HTML
, ">$out" or die $!;
51 $pages{$class} = 'N' . ($pages{$class} || '');
53 <?xml version="1.0" ?>
54 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
55 <html xmlns="http://www.w3.org/1999/xhtml">
58 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
62 <body style="background-color: white">
64 <p>No Perl-specific documentation currently exists for class
65 <code>$class</code> - please refer to the
66 <a href="https://xapian.org/docs/apidoc/html/annotated.html">C++
67 API documentation</a> for now.
73 $pages{$class} = 'Y' . ($pages{$class} || '');
75 system('pod2html', '--podroot=blib/lib', '--podpath=.', '--htmlroot', $root, '--infile', $in, '--outfile', $tmp) == 0
79 open TMP
, $tmp or die $!;
82 s!>the (.*?) manpage<!>$1<!g;
83 s!\bhref="mailto:.*?@.*?"!!g;
84 # Clean up redundant . and .. in links.
85 s!(href=")\./\.\./\.\./Search/Xapian/!$1!g;
86 s!(href=")\./\.\./\.\./Search/!$1../!g;
87 s!(href=")Xapian/\.\./\.\./Search/!$1!g;
88 while (m!\bhref="(?:../)*(Search/Xapian[^.]*)!g) {
91 $pages{$class} = ($pages{$class} || '') . '=';