[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] navidoc ./Makefile ./rst2any.py navidoc/utils/d...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] navidoc ./Makefile ./rst2any.py navidoc/utils/d... |
Date: |
Tue, 18 Mar 2003 10:09:55 -0500 |
CVSROOT: /cvsroot/navidoc
Module name: navidoc
Changes by: Asko Soukka <address@hidden> 03/03/18 10:09:54
Modified files:
. : Makefile rst2any.py
navidoc/utils : debug.py
Log message:
debugfix
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/Makefile.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/rst2any.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/utils/debug.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: navidoc/Makefile
diff -u navidoc/Makefile:1.1 navidoc/Makefile:1.2
--- navidoc/Makefile:1.1 Tue Mar 18 09:32:53 2003
+++ navidoc/Makefile Tue Mar 18 10:09:54 2003
@@ -33,7 +33,7 @@
find . -name "*.class" | xargs rm -f
html:
- $(JYTHON) rst2any.py 2html $(RST) $(DBG)
+ $(JYTHON) rst2any.py 2html $(RST) $(DBG) -d navidoc
html-loop:
- $(JYTHON) rst2any.py loop 2html $(RST) $(DBG)
\ No newline at end of file
+ $(JYTHON) rst2any.py loop 2html $(RST) $(DBG) -d navidoc
Index: navidoc/navidoc/utils/debug.py
diff -u navidoc/navidoc/utils/debug.py:1.2 navidoc/navidoc/utils/debug.py:1.3
--- navidoc/navidoc/utils/debug.py:1.2 Tue Mar 18 09:40:59 2003
+++ navidoc/navidoc/utils/debug.py Tue Mar 18 10:09:54 2003
@@ -43,4 +43,5 @@
print "[", dbg_name, "] :", dbg_str
def shorthand(self, dbg_name):
- return lambda dbg_string: self.out(dbg_name, dbg_string)
+ return lambda dbg_string, self=self, dbg_name=dbg_name: \
+ self.out(dbg_name, dbg_string)
Index: navidoc/rst2any.py
diff -u navidoc/rst2any.py:1.3 navidoc/rst2any.py:1.4
--- navidoc/rst2any.py:1.3 Tue Mar 18 09:43:52 2003
+++ navidoc/rst2any.py Tue Mar 18 10:09:54 2003
@@ -39,7 +39,7 @@
The main frontend for running Navidoc.
"""
-dbg = config.dbg.shorthand("main")
+dbg = config.dbg.shorthand('navidoc')
# XXX: figure out, why docutils want locals to be cleaned
import locale
@@ -55,25 +55,27 @@
"""
if os.path.isdir(path):
rstfiles = _rstFiles(path)
- if os.path.isfile(_slashify(path) + "docutils.conf"):
- config.docutils = _slashify(path) + "docutils.conf"
+ if os.path.isfile(_slashify(path) + 'docutils.conf'):
+ config.docutils = _slashify(path) + 'docutils.conf'
for rstfile in rstfiles:
rst2any(_slashify(path)+rstfile)
- elif os.path.isfile(path) or os.path.isfile(path+'.rst'):
+ elif os.path.isfile(path):
rst2any(path)
+ elif os.path.isfile(path+'.rst'):
+ rst2any(path+'.rst')
-def rst2any(filepath):
+def rst2any(input):
"""
Runs docutils for a single file.
"""
- if filepath.endswith(".rst"): filepath = filepath[0:len(filepath)-4]
+ if input.endswith('.rst'): output = input[0:len(input)-4]+'.gen.html'
+ else: output = input+'.gen.html'
+ args = "--config "+config.docutils+" "+input+' '+output
if html:
- args = "--config "+config.docutils+" "+filepath+'.rst
'+filepath+'.gen.html'
- dbg("Compiling: "+filepath)
+ dbg("Compiling: "+input)
docutils.core.publish_cmdline(writer_name='html', argv=args.split())
if latex:
- args = "--config "+config.docutils+" "+filepath+'.rst
'+filepath+'.gen.latex'
- dbg("Compiling: "+filepath)
+ dbg("Compiling: "+input)
docutils.core.publish_cmdline(writer_name='latex', argv=args.split())
# catching loop parameters from the command line
@@ -93,7 +95,7 @@
while 1:
dbg_name = sys.argv[sys.argv.index("-d") + 1]
config.dbg.enable(dbg_name)
- print "Enabling debug for:", dbg_name
+ print "Enabling debug output for:", dbg_name
sys.argv.remove("-d")
sys.argv.remove(dbg_name)
- [Gzz-commits] navidoc ./Makefile ./rst2any.py navidoc/utils/d...,
Asko Soukka <=