[Refdb-cvs] CVS: refdb/scripts statgen.pl,1.1.2.2,1.1.2.3
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2005-08-14 00:20:58
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30359/scripts Modified Files: Tag: Release_0_9_5_stable statgen.pl Log Message: create variablelist for docbook Index: statgen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/Attic/statgen.pl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -U2 -r1.1.2.2 -r1.1.2.3 --- statgen.pl 5 May 2005 17:07:50 -0000 1.1.2.2 +++ statgen.pl 14 Aug 2005 00:20:46 -0000 1.1.2.3 @@ -192,4 +192,7 @@ write_docbook(); } +elsif ($ARGV[0] eq "docbook-table") { + write_docbook_table(); +} else { write_tab(); @@ -226,10 +229,29 @@ } -# generate output for DocBook. The code creates a table with two columns which can be included into a DocBook document as an external entity +# generate output for DocBook. The code creates a variablelist which can be included into a DocBook document as an external entity. Looks worse than a table, but the linkends work sub write_docbook { + print "<!-- This variablelist is generated by statgen.pl. DO NOT modify this table as all changes will be lost. Change statgen.pl instead -->\n\n"; + + print "<variablelist>\n"; + + foreach my $item (@refstat) { + print " <varlistentry id=\"cs-status-@{$item}[0]\">\n"; + print " <term>@{$item}[0]</term>\n"; + print " <listitem>\n"; + print " <para>@{$item}[1]</para>\n"; + print " </listitem>\n"; + print " </varlistentry>\n"; + } + + print "</variablelist>\n\n"; + + print "<!-- end statgen.pl-generated code -->\n"; +} + +# generate output for DocBook. The code creates a table with two columns which can be included into a DocBook document as an external entity. Unfortunately, the linkends within the table don't work +sub write_docbook_table { print "<!-- This table is generated by statgen.pl. DO NOT modify this table as all changes will be lost. Change statgen.pl instead -->\n\n"; - print "<table>\n"; - print " <title>\&appname;d client/server status messages</title>\n"; + print "<informaltable>\n"; print " <tgroup cols=\"2\">\n"; print " <thead>\n"; @@ -242,6 +264,6 @@ foreach my $item (@refstat) { - print " <row>\n"; - print " <entry id=\"cs-status-@{$item}[0]\">@{$item}[0]</entry>\n"; + print " <row id=\"cs-status-@{$item}[0]\">\n"; + print " <entry>@{$item}[0]</entry>\n"; print " <entry>@{$item}[1]</entry>\n"; print " </row>\n"; @@ -250,5 +272,5 @@ print " </tbody>\n"; print " </tgroup>\n"; - print "</table>\n\n"; + print "</informaltable>\n\n"; print "<!-- end statgen.pl-generated code -->\n"; |