diff options
author | unknown <jcole@tetra.spaceapes.com> | 2001-10-14 19:29:23 -0500 |
---|---|---|
committer | unknown <jcole@tetra.spaceapes.com> | 2001-10-14 19:29:23 -0500 |
commit | fc03b5b20e65749347797708ba024f78e4da30b0 (patch) | |
tree | e138b9d8876461b3efa1f3b5647b35d5b6402316 /Docs/Support | |
parent | 14b07a30f742cd10d313bc2a21d410d9fc39e108 (diff) | |
download | mariadb-git-fc03b5b20e65749347797708ba024f78e4da30b0.tar.gz |
Added docbook-fixup.pl to fix up XML DocBook format.
Docs/Makefile.am:
Added docbook-fixup.pl.
Docs/manual.texi:
Fixed small bug. Removed old commented out part.
Diffstat (limited to 'Docs/Support')
-rwxr-xr-x | Docs/Support/docbook-fixup.pl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Docs/Support/docbook-fixup.pl b/Docs/Support/docbook-fixup.pl new file mode 100755 index 00000000000..81f1466fb06 --- /dev/null +++ b/Docs/Support/docbook-fixup.pl @@ -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; |