[docs] xmldocs - docelic modified 2 files

docs at icdevgroup.org docs at icdevgroup.org
Sat Dec 4 16:39:08 EST 2004


User:      docelic
Date:      2004-12-04 21:39:08 GMT
Modified:  bin      refs-autogen
Modified:  refs     image
Log:
- bin/refs-autogen:
 - Added support for "compound docs", that is, those containing more tag
   subtypes. (ictags.xml would contain uitags, systemtags and usertags).
 - Documents in "compund" output mode are prefixed with "ic".

 All the above is now the new default, but setting $compound = 0 gives us old
 behavior.

- refs/image: documented new check_date=

Revision  Changes    Path
1.70      +39 -4     xmldocs/bin/refs-autogen


rev 1.70, prev_rev 1.69
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- refs-autogen	28 Nov 2004 23:04:07 -0000	1.69
+++ refs-autogen	4 Dec 2004 21:39:08 -0000	1.70
@@ -17,6 +17,7 @@
 $Data::Dumper::Indent = 1;
 $Data::Dumper::Terse++;
 $Data::Dumper::Sortkeys++;
+$ENV{XMLDOCS_CUR_DEVEL} ||= "";
 }
 
 my $dumpdb = 0;
@@ -43,6 +44,7 @@
 my $autopath = "docbook/autorefs.ent";
 my %dups; # List of symbols names that are not unique
 my $last_path; # Last version we want docs generated for (say, 5.2.0).
+my $compounds = 1; # Summarize similar symbol groups to single page?
 
 my @page_order = (qw/purpose default structure synopsis description structure online example notes bugs/, "symbol type", "source", "author", "copyright", "see also");
 
@@ -77,6 +79,8 @@
 	globconf => "Global Configuration Directive",
 	catconf => "Catalog Configuration Directive",
 	filter => "Filter",
+	# Summarized:
+	tag => "Tag",
 );
 
 my %tagname = (
@@ -89,6 +93,8 @@
 	globconf => "option",
 	catconf => "option",
 	filter => "filter",
+	# Summarized:
+	tag => "tag",
 );
 
 # Default fields
@@ -418,8 +424,20 @@
 			# If they're not, find appropriate external document to link to
 			for my $sect ( keys %symbol_lists ) {
 				if ( grep {/^$itm$/} @{ $symbol_lists{$sect} } ) {
-					$linktype = "olink";
-					$linkarg = "targetdoc='${sect}s' targetptr";
+
+					# Add all cases where it's still possible that items are of different
+					# groups but will find their way to the same document in the end:
+					if ( $compounds and substr($group,-1,3) eq substr($sect,-1,3) ) {
+						# Do nothing, it's okay.
+					} elsif ( $compounds and substr($group,-1,4) eq substr($sect,-1,4) ) {
+						# Do nothing, it's okay.
+					} else {
+						# Documents won't end up in the same file even with $compounds
+						# enabled.
+						$linktype = "olink";
+						$linkarg = "targetdoc='${sect}s' targetptr";
+					}
+
 				}
 			}
 		}
@@ -514,6 +532,22 @@
 }
 }
 
+if ( $compounds ) {
+	# Let's see if this is the place to override output document name. For example,
+	# we want all types of tags to end up in ictags.xml. We'll add other
+	# symbol-specific overrides later (globconfs/catconfs come to mind).
+	# I don't like the idea but, 'manchmal muss man tun, was man tun muss' ;)
+	# We could generate both separate-file and onefile formats, but then we'd have
+	# to adjust all links differently and all that crap so it's not worth the fuss..
+	$symbols{tag} = {
+		%{ $symbols{systemtag} },
+		%{ $symbols{usertag} },
+		%{ $symbols{uitag} },
+	};
+	delete @symbols{qw/systemtag usertag uitag/};
+}
+
+
 # Produce reference sets (docbook element Reference contains RefEntries)
 for my $group ( keys %symbols ) {
 	# Prepare reference page
@@ -535,8 +569,9 @@
 	$refpage .= "\n" . '</reference>';
 
 	# Dump page
-	open OUT, "> refs/${group}s.xml" or
-		die "Can't produce reference refs/{$group}s.xml ($!)\n";
+	my $prefix = $compounds ? "ic" : "";
+	open OUT, "> refs/$prefix${group}s.xml" or
+		die "Can't produce reference refs/$prefix${group}s.xml ($!)\n";
 	print OUT $refpage;
 	close OUT;
 #}



1.8       +11 -0     xmldocs/refs/image


rev 1.8, prev_rev 1.7
Index: image
===================================================================
RCS file: /var/cvs/xmldocs/refs/image,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- image	9 Nov 2004 23:16:16 -0000	1.7
+++ image	4 Dec 2004 21:39:08 -0000	1.8
@@ -1,4 +1,5 @@
 
+TODO
 	      By  default,  the  width and height are maximum values. That is,
 	      the image is expanded or contracted to fit the width and	height
 	      value while maintaining the aspect ratio of the image. Append an
@@ -189,6 +190,16 @@
 	followed by none or one of <literal>%@!&lt;&gt;</literal>.
 	For a complete syntax, see <command>mogrify</command>
 	<literal>-geometry</literal> parameter.
+	</entry>
+</row>
+<row>
+	<entry><arg choice='plain'>check_date</arg></entry>
+	<entry></entry><entry></entry>
+	<entry>0</entry>
+	<entry>
+	Track original file's modification time and rebuild the resized image
+	when the source file changes? (This only makes sense with 
+	<arg choice='plain'>makesize</arg>.)
 	</entry>
 </row>
 <row>








More information about the docs mailing list