Bug 31518 - RFE: help for automated index generation
RFE: help for automated index generation
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: docbook-utils (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-12 11:47 EST by matti aarnio
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-19 06:09:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
db2html.diff (217 bytes, patch)
2001-03-12 11:49 EST, matti aarnio
no flags Details | Diff
jw.diff (docbook-utils-0.6-11) (1.36 KB, patch)
2001-03-12 11:50 EST, matti aarnio
no flags Details | Diff
db2html (454 bytes, text/plain)
2001-03-12 12:23 EST, Tim Waugh
no flags Details
db2html (482 bytes, text/plain)
2001-03-12 12:47 EST, Tim Waugh
no flags Details

  None (edit)
Description matti aarnio 2001-03-12 11:47:34 EST
I have couple of diffs for letting me to use  ``collateindex.pl'' tool
with the  db2html  and   jw  scripts.

First of all, the  db2html  treats argument skipping counts wrong:

--- /usr/bin/db2html    Fri Feb 23 20:17:43 2001
+++ db2html     Mon Mar 12 18:26:40 2001
@@ -3,7 +3,7 @@
 skip=0
 for arg in $*
 do
-  if [ $skip -gt 0 ]
+  if [ $skip -gt 1 ]
   then
     skip=$(($skip - 1))
     continue


The automated index generation (HTML.index file to spe specific) needs
passing of '-V html-index'  flag to the jade, this allows it
(sorry but cut&waste scrambled long lines at the entry box)

--- /usr/bin/jw	Fri Feb 23 20:17:41 2001
+++ jw	Tue Mar  6 16:22:45 2001
@@ -25,6 +25,7 @@
 \040 -i|--include <section>: \t Specify a SGML marked section to 
include\n\
 \040 \t\t\t\t (should be marked as \"ignore\" in the SGML text)\n\
 \040 -h|--help: \t\t\t Print this help message and exit\n\
+\040 -V <variable[=value]>: \t Set a variable\n\
 \040 -v|--version: \t\t Print the version and exit"
 
 # Get name of main SGML configuration file
@@ -77,7 +78,7 @@
 SGML_CURRENT_DIRECTORY=`pwd`
 
 # Set option: do not output many chunks
-SGML_NOCHUNKS=""
+SGML_OPTIONS=""
 
 # Set list of "include" marked sections
 SGML_INCLUDE=""
@@ -112,9 +113,12 @@
   -o|--output)	SGML_OUTPUT_DIRECTORY=$2
 		shift 2
 		;;
-  -u|--nochunks) SGML_NOCHUNKS="-V nochunks"
+  -u|--nochunks) SGML_OPTIONS="$SGML_OPTIONS -V nochunks"
 		shift 1
 		;;
+  -V)		SGML_OPTIONS="$SGML_OPTIONS -V $2"
+		shift 2
+		;;
   -i|--include)	case $2 in
 		  print|html)	echo "The marked section named \"$2\" is  reserved for
internal use by `basename $0`."
 				exit 1
@@ -298,7 +296,7 @@
 fi
 
 # Prepare the parser's arguments
-SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET 
$SGML_NOCHUNKS $SGML_DECL $SGML_FILE"
+SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET 
$SGML_OPTIONS $SGML_DECL $SGML_FILE"
 
 # Call the backend
 echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`"




With these I can do following:

PATH=.:$PATH # I need local version of jw, not /usr/bin/jw ...
OJCAT=/usr/share/sgml/openjade-1.3/catalog
./db2html -c ${OJCAT} -d `/bin/pwd`/'zmanual.dsl#html' -V html-index \
     zmanual.sgml

That "OJCAT" is necessary because  /etc/sgml/*.cat  files don't refer
to it, but I need "-//James Clark//DTD DSSSL Style Sheet//EN" DSSSL at
my own precursor style-sheet.
Comment 1 matti aarnio 2001-03-12 11:49:12 EST
Created attachment 12402 [details]
db2html.diff
Comment 2 matti aarnio 2001-03-12 11:50:17 EST
Created attachment 12403 [details]
jw.diff  (docbook-utils-0.6-11)
Comment 3 Tim Waugh 2001-03-12 12:23:28 EST
Regarding the db2html problem, please try this db2html script instead.
Comment 4 Tim Waugh 2001-03-12 12:23:59 EST
Created attachment 12406 [details]
db2html
Comment 5 matti aarnio 2001-03-12 12:45:59 EST
That script works.
What about necessary  jw  hacks ?
Comment 6 Tim Waugh 2001-03-12 12:47:14 EST
Actually I meant to attach the following one instead.  Sorry.

I'll run the -V stuff past the upstream maintainer.
Comment 7 Tim Waugh 2001-03-12 12:47:44 EST
Created attachment 12410 [details]
db2html
Comment 8 matti aarnio 2001-03-12 12:52:43 EST
Ack, lattest db2html works too to generate the HTML.index.
Comment 9 Tim Waugh 2001-03-12 13:40:08 EST
db2html fixed in docbook-utils-0.6-12 in rawhide.  I'll leave this bug report 
open for the -V bit.
Comment 10 Tim Waugh 2002-01-20 12:25:49 EST
Support for -V added in 0.6.9-15.

Note You need to log in before you can comment on or make changes to this bug.