mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Added docbook-fixup.pl to fix up XML DocBook format.
This commit is contained in:
parent
64ba731bd0
commit
a351429e26
3 changed files with 45 additions and 8 deletions
|
@ -96,6 +96,9 @@ nusphere.pdf: manual.texi
|
||||||
# Target to produce DocBook XML
|
# Target to produce DocBook XML
|
||||||
mysql.xml: manual.texi include.texi
|
mysql.xml: manual.texi include.texi
|
||||||
$(MAKEINFO) --force --no-ifinfo --docbook manual.texi
|
$(MAKEINFO) --force --no-ifinfo --docbook manual.texi
|
||||||
|
mv mysql.xml mysql-tmp.xml
|
||||||
|
Support/docbook-fixup.pl <mysql-tmp.xml >mysql.xml
|
||||||
|
rm -f mysql-tmp.xml
|
||||||
|
|
||||||
# The texi2dvi gives a lot of harmless errors. Just ignore them unless
|
# The texi2dvi gives a lot of harmless errors. Just ignore them unless
|
||||||
# you want to help with the typesetting part.
|
# you want to help with the typesetting part.
|
||||||
|
|
41
Docs/Support/docbook-fixup.pl
Executable file
41
Docs/Support/docbook-fixup.pl
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/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-customer-usage", "Credits", "News",
|
||||||
|
"Porting", "GPL-license", "LGPL-license", "Placeholder");
|
||||||
|
|
||||||
|
foreach $apx (@apx) {
|
||||||
|
print STDERR "Removing appendix $apx...\n";
|
||||||
|
$data =~ s{<appendix id=\"$apx\">(.+?)</appendix>}
|
||||||
|
{}gs;
|
||||||
|
};
|
||||||
|
|
||||||
|
print STDOUT $data;
|
|
@ -95,11 +95,6 @@ END-INFO-DIR-ENTRY
|
||||||
|
|
||||||
@node Top, Introduction, (dir), (dir)
|
@node Top, Introduction, (dir), (dir)
|
||||||
|
|
||||||
@c @ifhtml
|
|
||||||
@c <IMG SRC="Images/mysql-logo.gif">
|
|
||||||
@c <!--Image doesn't exist. Can't find suitable replacement. (Matt) -->
|
|
||||||
@c @end ifhtml
|
|
||||||
|
|
||||||
@ifinfo
|
@ifinfo
|
||||||
This is a manual for MySQL. This version is about the
|
This is a manual for MySQL. This version is about the
|
||||||
@value{mysql_version} version of MySQL. You can find a manual
|
@value{mysql_version} version of MySQL. You can find a manual
|
||||||
|
@ -135,9 +130,7 @@ distribution for that version.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
|
|
||||||
|
@node Introduction, Installing, Top, (dir)
|
||||||
|
|
||||||
@node Introduction, Installing, Top, Top
|
|
||||||
@chapter General Information About MySQL
|
@chapter General Information About MySQL
|
||||||
|
|
||||||
@cindex overview
|
@cindex overview
|
||||||
|
|
Loading…
Reference in a new issue