[interchange-docs] xmldocs - docelic modified 2 files
docs at icdevgroup.org
docs at icdevgroup.org
Thu Jul 5 16:50:12 EDT 2007
User: docelic
Date: 2007-07-05 20:50:12 GMT
Modified: bin infobot.facts generic-autogen
Log:
* Make glossary generation produce tmp/glossary.list (list of glossary items),
and make infobot fact file include those pointers to glossary.
* Add Widget: definition to infobot.facts script for more accurate
bot knowledge
Revision Changes Path
1.2 +10 -2 xmldocs/bin/infobot.facts
rev 1.2, prev_rev 1.1
Index: infobot.facts
===================================================================
RCS file: /var/cvs/xmldocs/bin/infobot.facts,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- infobot.facts 30 Aug 2006 09:08:01 -0000 1.1
+++ infobot.facts 5 Jul 2007 20:50:12 -0000 1.2
@@ -29,6 +29,8 @@
systemtags => 'tags',
uitags => 'tags',
usertags => 'tags',
+glossary => 'glossary',
+widget => 'widget',
);
# Translation from compound to "English"
@@ -39,6 +41,8 @@
'orderchecks' => 'Ordercheck: ',
'pragmas' => 'Pragma: ',
'tags' => 'Tag: ',
+'glossary' => 'Glossary: ',
+'widget' => 'Widget: ',
);
@@ -47,7 +51,10 @@
while ($_ = <IN>) {
chomp;
my $data = $trEn{$tr{$file}} . $prefix . $tr{$file} . '/' . $_ . '.html';
- push(@{$output{$_}}, $data) unless grep {/^$data$/} @{$output{$_}};
+
+ unless ( grep {/^$data$/} @{$output{$_}} ) {
+ push(@{$output{$_}}, $data)
+ }
}
close IN or die "Can't rdclose 'tmp/$file.list' ($!)\n";
}
@@ -55,7 +62,8 @@
open OUT, "> $output" or die "Can't wropen '$output' ($!)\n";
while (my($k,$v) = each %output) {
- $v = join ", ", @$v;
+ @$v = grep {!/^\s*$/} @$v;
+ $v = join " , ", @$v;
print OUT "$k => $v\n";
}
close OUT or die "Can't wrclose '$output' ($!)\n";
1.20 +12 -2 xmldocs/bin/generic-autogen
rev 1.20, prev_rev 1.19
Index: generic-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/generic-autogen,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- generic-autogen 16 Nov 2006 13:02:20 -0000 1.19
+++ generic-autogen 5 Jul 2007 20:50:12 -0000 1.20
@@ -19,6 +19,7 @@
my @loaded;
my $document;
my $visible_name;
+my (@glossentries, @howtoentries); # To produce tmp/{glossary,howto}.list
my %sn = ( # short name
glossary => "glos",
howtos => "howto",
@@ -83,6 +84,7 @@
if ( $cat eq 'howtos' ) {
$visible_name = <IN>;
} else {
+ push @glossentries, $file;
( $visible_name = $file ) =~ s/-/ /g;
}
@@ -146,14 +148,22 @@
open OUT, "> $cat/$cat.xml" or
die "Can't wropen $cat/$cat.xml ($!)\n";
print OUT $document;
-close OUT or warn "Cant close $cat/$cat.xml ($!)\n";
+close OUT or warn "Can't wrclose $cat/$cat.xml ($!)\n";
# Print out missing list
print "GEN: tmp/missing2\n";
open OUT, "> tmp/missing2" or
die "Can't wropen tmp/missing2 ($!)\n";
print OUT Dumper \%invalid;
-close OUT or warn "Cant close tmp/missing2 ($!)\n";
+close OUT or warn "Can't wrclose tmp/missing2 ($!)\n";
+
+
+my $file = "tmp/glossary.list";
+print "GEN: $file\n";
+open OUT, "> $file" or die "Can't wropen $file ($!)\n";
+for (@glossentries) { print OUT "$_\n" }
+close OUT or warn "Can't wrclose $file ($!)\n";
+
exit 0;
More information about the docs
mailing list