Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37042668
en ru br
ALT Linux repos
S:3.0.3-alt6.2.1
5.0: 3.0.3-alt6.1
4.1: 3.0.3-alt6.1
4.0: 3.0.3-alt6
3.0: 3.0.3-alt5.1

Group :: Publishing
RPM: sgmltools-lite

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: sgmltools-lite-3.0.3-deb-fixes.patch
Download


diff -durN sgmltools-lite-3.0.3.orig/man/sgmltools-lite.1 sgmltools-lite-3.0.3/man/sgmltools-lite.1
--- sgmltools-lite-3.0.3.orig/man/sgmltools-lite.1	Tue Apr 24 22:13:58 2001
+++ sgmltools-lite-3.0.3/man/sgmltools-lite.1	Sat Apr  6 03:53:09 2002
@@ -28,7 +28,7 @@ sgmltools \- process sgml files.
 .SH SYNOPSIS
 .B sgmltools
 [\-b backend] [\-d] [\-v] [\-V] [\-h] [\-l] [\-s dsssl_spec] [\-j jadeopt]
-[\-\-backend={html,onehtml,ps,dvi,rtf,txt,ld2db,jadetex,pdb,lynx,w3m}] [\-\-debug] 
+[\-\-backend={onehtml,html,ps,dvi,rtf,txt,ld2db,jadetex,pdb,lynx,w3m}] [\-\-debug] 
 [\-\-verbose] 
 [\-\-dsssl\-spec=dsssl_spec] [\-\-jade\-opt=jadeopt]
 [\-\-version] [\-\-help] [\-\-license]
@@ -51,9 +51,9 @@ expects a DocBook SGML file and will con
 expects a DocBook SGML file and will convert it into RTF.
 .B html
 expects a DocBook SGML file and will convert it into HTML; the resulting
-files will be put in a subdirectory (default).
+files will be put in a subdirectory.
 .B onehtml
-expects a DocBook SGML file and will convert it into a single HTML file.
+expects a DocBook SGML file and will convert it into a single HTML file (default).
 .B txt
 expects a DocBook SGML file and will convert it into ASCII. Note that this
 backend actually uses the w3m (preferred) or lynx (if w3m not found) backends.
diff -durN sgmltools-lite-3.0.3.orig/python/SGMLtools.py sgmltools-lite-3.0.3/python/SGMLtools.py
--- sgmltools-lite-3.0.3.orig/python/SGMLtools.py	Wed Oct 25 10:00:05 2000
+++ sgmltools-lite-3.0.3/python/SGMLtools.py	Mon Apr  8 04:03:54 2002
@@ -215,8 +215,10 @@
 	envname = 'SGML_SEARCH_PATH'
 	if os.environ.has_key(envname):
 	    os.environ[envname] = os.environ[envname] + ':' + os.getcwd()
+	    os.environ[envname] = os.environ[envname] + ':' + "/usr/share/sgml"
 	else:
 	    os.environ[envname] = os.getcwd()
+	    os.environ[envname] = os.environ[envname] + ':' + "/usr/share/sgml"
 	os.chdir(savdir)
 
 	#
@@ -234,10 +236,32 @@
 	    addJadeOpt = ' ' + userJadeOpt
 
 	#
+	# the "nochunks hack"
+	# "-b html -j 'nochunks'" = "-b onehtml"
+	if self._curbackend == 'html':
+	    optlist_nochunks_hack, args_nochunks_hack = getopt.getopt(addJadeOpt.split(), 'V:')
+	    for curopt_nochunks_hack in optlist_nochunks_hack:
+		if (curopt_nochunks_hack[0] == '-V') and (curopt_nochunks_hack[1] == 'nochunks'):
+		    print """The html backend tries to convert a sgml file
+into one-file-for-one-section html format, but the
+-j '-V nochunks' does not allow it.  Assuming -b onehtml instead.
+If you really want to use the html backend with -j '-V nochunks', try:
+  sgmltools -b html -j '-V "nochunks"'
+"""
+		    self._curbackend = 'onehtml'
+		    be = self._classes[self._curbackend](self._filename, self._fileinfo, self._curglobal, self._tracer, self._autoconf)
+
+	#
 	#  Open the input file and give the pre-Jade routine a shot.
 	#
 	infile = open(self._filename, 'r')
 	nextfile = be.preJade(infile)
+	jadeinputfile = utils.makeTemp()
+
+	catcmd = '/bin/cat >' + jadeinputfile
+	catpipe = os.popen(catcmd, 'w')
+	catpipe.writelines(nextfile.readlines())
+	catpipe.close()
 
 	#
 	#  Run Jade attached to a pipe
@@ -248,15 +272,18 @@
 	jadeoutfile = utils.makeTemp()
 	jadecmd = jadecmd + ' -o ' + jadeoutfile
 	jadecmd = jadecmd + addJadeOpt
+	jadecmd = jadecmd + ' ' + jadeinputfile + ' '
 	jadestdoutfile = utils.makeTemp()
 	jadecmd = jadecmd + ' >' + jadestdoutfile
 	self._tracer.trace(jadecmd)
-	jadepipe = os.popen(jadecmd, 'w')
+
+	#jadepipe = os.popen(jadecmd, 'w')
+	self._tracer.system(jadecmd)
 
 	#
 	#  Pump nextfile->jadepipe, and close all files.
 	#
-	jadepipe.writelines(nextfile.readlines())
+	#jadepipe.writelines(nextfile.readlines())
 	try:
 	    jadepipe.close();
 	    infile.close();
diff -durN sgmltools-lite-3.0.3.orig/python/backends/Html.py sgmltools-lite-3.0.3/python/backends/Html.py
--- sgmltools-lite-3.0.3.orig/python/backends/Html.py	Thu Oct 26 10:20:23 2000
+++ sgmltools-lite-3.0.3/python/backends/Html.py	Sun Apr  7 19:53:36 2002
@@ -60,7 +60,15 @@
         else:
             self._tracer.mkdir(destdir)
 
-        self._tracer.mv(self._tempdir + '/*', destdir)
+	#
+	#  if the output directory is empty, issue a warning
+	#
+	if os.listdir(self._tempdir) == []:
+	    print '''warning: the output directory is empty
+maybe you should use "-b onehtml" instead of "-b html"'''
+	else:
+	    self._tracer.mv(self._tempdir + '/*', destdir)
+
 	self._tracer.rmdir(self._tempdir)
 
 	#
@@ -74,7 +82,6 @@
 	    self._tracer.symlink(indexfile, 'index.html')
 	except:
 	    pass
-
 
 	self._tracer.chdir(self._savdir)
 
diff -durN sgmltools-lite-3.0.3.orig/python/backends/Ld2db.py sgmltools-lite-3.0.3/python/backends/Ld2db.py
--- sgmltools-lite-3.0.3.orig/python/backends/Ld2db.py	Thu Aug  3 16:38:57 2000
+++ sgmltools-lite-3.0.3/python/backends/Ld2db.py	Mon Apr  8 03:55:36 2002
@@ -45,6 +45,7 @@
 	    elif string.find(i, 'entities/iso-entities-8879.1986') != -1:
 		newcatfiles.append(i)
 
+	newcatfiles.append("/etc/sgml/sgml-linuxdoc.cat")
 	os.environ["SGML_CATALOG_FILES"] = string.join(newcatfiles, ':')
 	self._tracer.trace('SGML_CATALOG_FILES=' + 
 			   os.environ["SGML_CATALOG_FILES"])
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin