mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
41 lines
1,000 B
Perl
Executable file
41 lines
1,000 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
sub fix {
|
|
$str = shift;
|
|
$str =~ tr/_/-/;
|
|
return $str;
|
|
};
|
|
|
|
$data = join "", <STDIN>;
|
|
|
|
print STDERR "Changing @@ to @...\n";
|
|
$data =~ s/@@/@/gs;
|
|
|
|
print STDERR "Changing '_' to '-' in references...\n";
|
|
$data =~ s{id=\"(.+?)\"}
|
|
{"id=\"".&fix($1)."\""}gsex;
|
|
$data =~ s{linkend=\"(.+?)\"}
|
|
{"linkend=\"".&fix($1)."\""}gsex;
|
|
|
|
print STDERR "Changing ULINK to SYSTEMITEM...\n";
|
|
$data =~ s{<ulink url=\"(.+?)\"></ulink>}
|
|
{<systemitem role=\"url\">$1</systemitem>}gs;
|
|
|
|
print STDERR "Removing INFORMALFIGURE...\n";
|
|
$data =~ s{<informalfigure>(.+?)</informalfigure>}
|
|
{}gs;
|
|
|
|
print STDERR "Adding PARA inside ENTRY...\n";
|
|
$data =~ s{<entry>(.+?)</entry>}
|
|
{<entry><para>$1</para></entry>}gs;
|
|
|
|
@apx = ("Users", "MySQL Testimonials", "News",
|
|
"GPL-license", "LGPL-license");
|
|
|
|
foreach $apx (@apx) {
|
|
print STDERR "Removing appendix $apx...\n";
|
|
$data =~ s{<appendix id=\"$apx\">(.+?)</appendix>}
|
|
{}gs;
|
|
};
|
|
|
|
print STDOUT $data;
|