[docs] xmldocs - docelic modified bin/refs-autogen
docs at icdevgroup.org
docs at icdevgroup.org
Wed Dec 15 12:27:05 EST 2004
User: docelic
Date: 2004-12-15 17:27:05 GMT
Modified: bin refs-autogen
Log:
- Added support to include a preamble on autogenerated reference sets.
Also added a testing preamble for tags.xml. Including the whole introduction
to tags *really* doesn't look good (it's 15 pages of text, while all the
reference page is supposed to do is list the directives at the top of the
page!).
So in the preamble, instead of the whole text, I included a pointer to
a glossary entry. This is acceptable I think.
Revision Changes Path
1.74 +30 -0 xmldocs/bin/refs-autogen
rev 1.74, prev_rev 1.73
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- refs-autogen 8 Dec 2004 12:39:58 -0000 1.73
+++ refs-autogen 15 Dec 2004 17:27:04 -0000 1.74
@@ -127,6 +127,19 @@
example => "</para>\n</example>",
);
+# Support preamble texts
+my %preamble = (
+ # Dude, this is 15 pages of text in place where there shouldn't be any really
+ #tag => scalar readfile('glossary/ITL'),
+ tag => "For a complete introduction to the &IC; Tag Language and " .
+ "the supported syntax, please see the &glos-ITL; glossary entry.",
+ conf => "",
+ globvar => "",
+ catvar => "",
+ pragma => "",
+ filter => "",
+);
+
my @paths = @ARGV; # Versions requested
my $path; # Current path, used in loop for each version requested
my $dumppath; # Path to cache dump file
@@ -588,6 +601,13 @@
<reference id="${group}s">
<title>Interchange Reference Pages: $longname{$group}s</title>
+
+ <partintro>
+ <para>
+ $preamble{$group}
+ </para>
+ </partintro>
+
ENDD
## Add items
@@ -967,6 +987,16 @@
#<title>ONLINE EXAMPLES</title>
#$ag{"online"}
#</refsect1>
+
+sub readfile {
+ my $file = shift;
+ open IN, $file or die "Can't open $file ($!)\n";
+ my @slurp = <IN>;
+ close IN;
+
+ local $" = "";
+ wantarray? @slurp : "@slurp"
+}
sub load_templates {
More information about the docs
mailing list