[docs] xmldocs - docelic modified 2 files
docs at icdevgroup.org
docs at icdevgroup.org
Wed Sep 22 05:02:47 EDT 2004
User: docelic
Date: 2004-09-22 09:02:47 GMT
Modified: . TODO
Modified: bin refs-autogen
Log:
- bin/refs-autogen:
- compress the "Available in" field (like, 4.6.0-5.2.0) as Jon suggested
- TODO: items
Revision Changes Path
1.21 +17 -22 xmldocs/TODO
rev 1.21, prev_rev 1.20
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- TODO 22 Sep 2004 08:02:47 -0000 1.20
+++ TODO 22 Sep 2004 09:02:47 -0000 1.21
@@ -6,29 +6,17 @@
of plain "C").
- See why the autogenerated navigation links are so retarded (just home/up,
no next/prev)
-- In refs-autogen at a few places we keep both the hash/array representation
- of values, and their string representation. (We always generate string
- when modifying array/hash). It should be made so that we only modify
- array/hash during the whole program, then in the last step before
- generating the template they get stringified.
-- Visually mark obsolete items (those not present in cvs-head)
-- leaf nodes
- not to forget, fix cases where context goes to negative values
- In iccattut:
- - mention which paths would be valid for /usr/local tarball
- install.
- under important file and directories, mention default username,
- and /cgi-bin/ vs /cgi-bin/ic/ in the Catalog line. And rename the section
- appropriately.
+ And rename the section appropriately.
- make a "translation map" of /etc/interchange/* to RPM-equivs.
- item for package names, like interchange-cat-foundation, wenglish, etc..
- - fix markup in iccattut section "pages/checkout.html"
- and "etc/profiles.order" and 2 sections after it and below
+ ( This is ok, docbook 4.4 will have <package> element )
- at the top where describing IC, mention it's built on Perl and ITL
- - replace [area search] in phase5 with better (file and directory)
- - replace <tag> with <code> where putting tag alone in the source would work.
- - explain syntax accepted in profile files
+ - replace <tag> with <code> where putting tag alone in the source would work.
+ - explain syntax accepted in profile files
DOCUMENTATION SYSTEM:
- copy the definition for <example> to a
@@ -40,7 +28,7 @@
(%tag.* structures) and warn if invalid option is found in any tag file.
iccattut:
-- give examples for the tasks in 'do yourself' section
+- give examples for the tasks in 'do yourself' section (in progress)
- give good practices about filtering, security
- see problems from old docs/TODO notes on iccattut
@@ -58,15 +46,22 @@
say, 15 lines of context, but it'll come great when you have a copy
of a 300-lines usertag. Example for this could be taken directly out of
mwforum demo on mwforum.org
-- Make that thing Jon suggested, to write like "4.8.0-5.3.0" instead of
- "4.8.0, 5.0.0, 5.2.0, 5.3.0" (will probably look better in the future).
+- In refs-autogen at a few places we keep both the hash/array representation
+ of values, and their string representation. (We always generate string
+ when modifying array/hash). It should be made so that we only modify
+ array/hash during the whole program, then in the last step before
+ generating the template they get stringified.
+- Visually mark obsolete items (those not present in cvs-head)
+- leaf nodes
Long-term:
- filenames in Source contexts should also be clickable. this is longterm
because it'll involve perltidy and other stuff I have in mind ...
-- rebuild the make system
-- isolate build steps and make it possible to build specific "pages"
- without the rest
+
+- rebuild the make system:
+ - isolate build steps and make it possible to build specific "pages"
+ without the rest
+ - better dependencies
DOCUMENTATION ITSELF:
- Resolve items from tmp/missing file. (You need to run 'make' in your tree
1.31 +40 -0 xmldocs/bin/refs-autogen
rev 1.31, prev_rev 1.30
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- refs-autogen 22 Sep 2004 08:02:47 -0000 1.30
+++ refs-autogen 22 Sep 2004 09:02:47 -0000 1.31
@@ -58,6 +58,7 @@
my %templates;
my $max_ctxs = 10;
my @set_missing_all;
+my @parsed_versions;
my @page_order = (qw/purpose default structure synopsis description example notes bugs/, "symbol type", "source", "author", "copyright", "see also");
@@ -112,6 +113,8 @@
# no more).
loaddb( "$cachedir/$dumppath" );
+ push @parsed_versions, $hash{version};
+
# Outer loop: symbol types (pragmas, globvars, ...)
# Inner loop: actual symbols
while ( my ($gkey,$gval) = each %{ $hash{symbols} } ) {
@@ -300,6 +303,9 @@
}
$ag{'see also'} = join ", ", @see_items;
+ # Compress 4.6.0, 4.8.0, 5.0.0 to 4.6.0-5.0.0
+ $ag{'available in'} = compress_availability($ag{'_available in'});
+
# Finally, set default values if they weren't overriden by real information
for my $field (@page_order) {
if ( ! $ag{$field} ) {
@@ -327,6 +333,40 @@
# Save
$symbols{$k} = $template unless ( $ag{ignore} and $ag{ignore} =~ /[y1d]/i );
+}
+
+sub compress_availability {
+ my @avails = my @orig = @{ (shift) };
+ @avails or die "compress_availability(): Shouldn't happen";
+
+ # XXX this needs work, but at the moment it serves us well
+ # (it can't handle like x-y, z, a-b. It only handles start-end)
+
+ my $start = shift @avails;
+ my $si; # starting index
+ my $cl = 0; # compress level
+ for (my $i=0; $i<@parsed_versions;$i++) {
+ if ( $parsed_versions[$i] eq $start ) {
+ $si = $i;
+ }
+ }
+ my $end;
+ while ( $_ = shift @avails ) {
+ if ( $parsed_versions[++$si] eq $_ ) {
+ $end = $_;
+ $cl++;
+ } else {
+ unshift @avails, $_;
+ last
+ }
+ }
+ local $" = ", ";
+ if ( $cl > 2 ) {
+ unshift @avails, "$start-$end";
+ return "@avails"
+ } else {
+ return "@orig"
+ }
}
More information about the docs
mailing list