[docs] xmldocs - docelic modified 3 files
docs at icdevgroup.org
docs at icdevgroup.org
Fri Jul 30 07:37:54 EDT 2004
User: docelic
Date: 2004-07-30 11:37:54 GMT
Modified: bin refs-autogen
Modified: refs/init_page control
Modified: refs/pre_page control
Log:
- bin/refs-autogen:
- Finally added support for "bidirectional" linking. That is:
If symbol A refers to B and C in the See Also section, then A and C
will be pushed to B's See Also, and A and B to C's See Also.
Duplicates (and self-references) are of course eliminated.
Also, this only works for Interchange symbols; if a symbol refers to say,
the top(1) command and one other Interchange symbol, the top(1) entry
won't be "autolinked" because chances are it's specific to an item.
- refs/*/control:
- removed some of the links to see autolinking at work
Revision Changes Path
1.9 +19 -1 xmldocs/bin/refs-autogen
rev 1.9, prev_rev 1.8
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- refs-autogen 28 Jul 2004 15:27:04 -0000 1.8
+++ refs-autogen 30 Jul 2004 11:37:54 -0000 1.9
@@ -168,8 +168,27 @@
while ( my($k,$v) = each %autogenerated ) {
my %ag = %$v;
+ # Do temporary-only modifications to %ag
+
+ # Double check
$ag{name} ||= $ag{id} || $k;
+ # See Also "bidirectional" linking
+ if ( $ag{'see also'} ) {
+ ( my $list = $ag{'see also'} ) =~ s/,/ /g;
+ my @list = split /\s+/, $list;
+ @list = grep {$autogenerated{$_} and $_ ne $ag{name}} @list;
+
+ for my $sym ( @list ) {
+ ( my $list2 = $autogenerated{$sym}{'see also'} || "") =~ s/,/ /g;
+ my @list2 = split /\s+/, $list2;
+ push @list2, @list, $k;
+ { my %h; @list2 = grep {!$h{$_}++ and $sym ne $_} @list2 }
+ $autogenerated{$sym}{'see also'} = join ", ", @list2;
+ }
+ }
+
+ # Finally, set default values if they weren't overriden by real information
for my $field (@page_order) {
if ( ! $ag{$field} ) {
if ( grep {/$field/} @mandatory) {
@@ -180,7 +199,6 @@
}
}
- # Do temporary-only modifications to %ag
$ag{latest} = $hash{version};
# Expand template
1.3 +1 -1 xmldocs/refs/init_page/control
rev 1.3, prev_rev 1.2
Index: control
===================================================================
RCS file: /var/cvs/xmldocs/refs/init_page/control,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- control 23 Jul 2004 13:32:02 -0000 1.2
+++ control 30 Jul 2004 11:37:54 -0000 1.3
@@ -11,5 +11,5 @@
author:
# leave empty; GPL is the default
copyright:
-see also: init_page, pre_page, post_page
+see also:
default: none
1.3 +1 -1 xmldocs/refs/pre_page/control
rev 1.3, prev_rev 1.2
Index: control
===================================================================
RCS file: /var/cvs/xmldocs/refs/pre_page/control,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- control 23 Jul 2004 13:32:02 -0000 1.2
+++ control 30 Jul 2004 11:37:54 -0000 1.3
@@ -11,5 +11,5 @@
author:
# leave empty; GPL is the default
copyright:
-see also: init_page, pre_page, post_page
+see also: init_page, post_page
default: none
More information about the docs
mailing list