Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 47 lines (34 sloc) 816 Bytes
#!/usr/bin/perl
use FindBin qw( $Bin );
chdir($Bin);
system 'rm -f `find website/htdocs/pod -name *.html -print`';
for my $pod (<*.pod>, <Tangram/*.pod>)
{
my $html = $pod;
$html =~ s/\.pod$/.html/;
$html =~ s:Tangram/::;
system "pod2html --infile $pod --outfile website/htdocs/pod/$html";
}
my @pods = <website/htdocs/pod/*.html>;
sub improve (&)
{
my $sub = shift;
local $/;
for my $file (@pods)
{
local *FH;
open(FH, $file) || die "Cannot open $file for reading, reason: $!";
local $_ = <FH>;
close(FH);
&$sub;
open(FH, ">$file") || die "Cannot open $file for writing, reason: $!";
print FH;
close(FH);
}
}
improve
{
s{<A HREF="/Tangram/}{<A HREF="}g;
s{<body>}{<body text=black bgcolor=lightyellow>}gi;
s{(www.tangram-persistence.org)}{<a href="http://$1"> $1 </a>}g;
};
Jump to Line
Something went wrong with that request. Please try again.