[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 11:02:27 -0500 |
CVSROOT: /cvsroot/navidoc
Module name: navidoc
Changes by: Asko Soukka <address@hidden> 03/03/18 11:02:27
Modified files:
. : Makefile rst2any.py
navidoc/utils : debug.py path.py
Log message:
fix
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/Makefile.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/rst2any.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/utils/debug.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/utils/path.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: navidoc/Makefile
diff -u navidoc/Makefile:1.2 navidoc/Makefile:1.3
--- navidoc/Makefile:1.2 Tue Mar 18 10:09:54 2003
+++ navidoc/Makefile Tue Mar 18 11:02:27 2003
@@ -33,7 +33,7 @@
find . -name "*.class" | xargs rm -f
html:
- $(JYTHON) rst2any.py 2html $(RST) $(DBG) -d navidoc
+ $(JYTHON) rst2any.py --html $(RST) $(DBG) -d navidoc
html-loop:
- $(JYTHON) rst2any.py loop 2html $(RST) $(DBG) -d navidoc
+ $(JYTHON) rst2any.py --loop --html $(RST) $(DBG) -d navidoc
Index: navidoc/navidoc/utils/debug.py
diff -u navidoc/navidoc/utils/debug.py:1.3 navidoc/navidoc/utils/debug.py:1.4
--- navidoc/navidoc/utils/debug.py:1.3 Tue Mar 18 10:09:54 2003
+++ navidoc/navidoc/utils/debug.py Tue Mar 18 11:02:27 2003
@@ -30,6 +30,10 @@
class DebugFilter:
"""Handle debug streams."""
+ short = "d:D:"
+ long = ["--dbg="]
+ all = ["-d", "-D"] + long
+
output_enabled = {}
def __init__(self):
Index: navidoc/navidoc/utils/path.py
diff -u navidoc/navidoc/utils/path.py:1.1 navidoc/navidoc/utils/path.py:1.2
--- navidoc/navidoc/utils/path.py:1.1 Tue Mar 18 09:32:53 2003
+++ navidoc/navidoc/utils/path.py Tue Mar 18 11:02:27 2003
@@ -31,8 +31,8 @@
"""
Returns all ".rst" files under path. Nonrecursive.
"""
- files = [f for f in os.listdir(mputils._slashify(path)) \
- if os.path.isfile(mputils._slashify(path)+f) and not
f.startswith('.')
+ files = [f for f in os.listdir(_slashify(path)) \
+ if os.path.isfile(_slashify(path)+f) and not f.startswith('.')
and '#' not in f and '~' not in f]
rstfiles = [f for f in files if f.endswith('.rst')]
return rstfiles
Index: navidoc/rst2any.py
diff -u navidoc/rst2any.py:1.4 navidoc/rst2any.py:1.5
--- navidoc/rst2any.py:1.4 Tue Mar 18 10:09:54 2003
+++ navidoc/rst2any.py Tue Mar 18 11:02:27 2003
@@ -27,11 +27,11 @@
__docformat__ = 'reStructuredText'
-import sys, os.path
+import sys, os.path, getopt
import docutils.core
-import navidoc.utils.path
+from navidoc.utils.path import _rstFiles, _slashify, relative_path
import config
@@ -79,33 +79,28 @@
docutils.core.publish_cmdline(writer_name='latex', argv=args.split())
# catching loop parameters from the command line
-try: sys.argv.remove("loop"); loop = 1
+try: sys.argv.remove("--loop"); loop = 1
except ValueError: loop = 0
# catching writer parameters from the command line
-try: sys.argv.remove("2latex"); latex = 1
+try: sys.argv.remove("--latex"); latex = 1
except ValueError: latex = 0
# catching writer parameters from the command line
-try: sys.argv.remove("2html"); html = 1
+try: sys.argv.remove("--html"); html = 1
except ValueError: html = 0
# catching debug parameters
-try:
- while 1:
- dbg_name = sys.argv[sys.argv.index("-d") + 1]
- config.dbg.enable(dbg_name)
- print "Enabling debug output for:", dbg_name
- sys.argv.remove("-d")
- sys.argv.remove(dbg_name)
-
-except ValueError: pass
+dbg_names, sys.argv = getopt.getopt(sys.argv[1:], config.dbg.short,
config.dbg.long)
+for dbg_name in dbg_names:
+ config.dbg.enable(dbg_name[1])
+ print "Enabling debug output for:", dbg_name[1]
# conversion loop
while 1:
#the first pass, docutils
- for path in sys.argv[1:]:
+ for path in sys.argv:
run_docutils(path)
# try: