X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fdevel%2Ftools%2Frt-static-docs;h=e9fdcc658fdb9762f91e9de9ed661dfe7f3ca00d;hb=7322f2afedcc2f427e997d1535a503613a83f088;hp=8ad86b1533e5dba52689f9c5d9a28b9d2e1f7e97;hpb=919e930aa9279b3c5cd12b593889cd6de79d67bf;p=freeside.git diff --git a/rt/devel/tools/rt-static-docs b/rt/devel/tools/rt-static-docs index 8ad86b153..e9fdcc658 100644 --- a/rt/devel/tools/rt-static-docs +++ b/rt/devel/tools/rt-static-docs @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -54,6 +54,7 @@ use File::Temp; use File::Spec; use File::Path qw(make_path rmtree); use File::Copy qw(copy); +use Encode qw(decode_utf8); use HTML::Entities qw(encode_entities); use RT::Pod::HTMLBatch; @@ -142,14 +143,21 @@ for my $file () { open my $source, "<", $file or warn "Can't open $file: $!", next; - open my $html, ">", $dest - or warn "Can't open $dest: $!", next; + my $str = ""; + $str .= encode_entities(decode_utf8($_)) while <$source>; + close $source; - print $html "
";
-    print $html encode_entities($_) while <$source>;
-    print $html "
"; + $str = "
$str
"; + $str =~ s{\bdocs/([a-z_-]+)\.pod\b}{docs/$1.pod}ig; + $str =~ s{\betc/(RT_Config)\.pm\b}{etc/$1.pm}g; + $str =~ s{\betc/(UPRGADING\.mysql)\b}{etc/$1}g; + $str =~ s{\b(https?://(?!rt\.example\.com)[.a-z0-9/_:-]+(?$1}ig; + $str =~ s{\b([\w-]+\@(lists\.)?bestpractical.com)\b}{$1}g; - close $source; close $html; + open my $html, ">", $dest + or warn "Can't open $dest: $!", next; + print $html $str; + close $html; $converter->note_for_contents_file([$name], $file, $dest); }