[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] navidoc ./config.py ./docutils.conf ./rst2any.p...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] navidoc ./config.py ./docutils.conf ./rst2any.p... |
Date: |
Wed, 19 Mar 2003 04:23:26 -0500 |
CVSROOT: /cvsroot/navidoc
Module name: navidoc
Changes by: Asko Soukka <address@hidden> 03/03/19 04:23:26
Modified files:
. : config.py docutils.conf rst2any.py
navidoc : __init__.py
navidoc/utils : debug.py
Log message:
catch docutils output
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/config.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/docutils.conf.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.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/utils/debug.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: navidoc/config.py
diff -u navidoc/config.py:1.3 navidoc/config.py:1.4
--- navidoc/config.py:1.3 Tue Mar 18 11:28:36 2003
+++ navidoc/config.py Wed Mar 19 04:23:26 2003
@@ -22,6 +22,7 @@
__docformat__ = 'reStructuredText'
import os.path
+import docutils.utils
from navidoc.utils.debug import DebugFilter
@@ -35,9 +36,9 @@
# global settings needed all around, these
# should be automaticly re-set before compiling reST
-working_directory = './'
-input_filename = './'
-output_filename = './'
+working_directory = '.'
+input_filename = ''
+output_filename = ''
# pegs will be sorted after their priority
pegboard_priorities = {'Current': 1,
Index: navidoc/docutils.conf
diff -u navidoc/docutils.conf:1.1 navidoc/docutils.conf:1.2
--- navidoc/docutils.conf:1.1 Tue Mar 18 09:32:53 2003
+++ navidoc/docutils.conf Wed Mar 19 04:23:26 2003
@@ -3,7 +3,7 @@
# These entries affect all processing:
output-encoding: iso-8859-1
source-link: 1
-language: en
+language: fi
datestamp: %c
generator: 1
Index: navidoc/navidoc/__init__.py
diff -u navidoc/navidoc/__init__.py:1.1 navidoc/navidoc/__init__.py:1.2
--- navidoc/navidoc/__init__.py:1.1 Tue Mar 18 09:32:53 2003
+++ navidoc/navidoc/__init__.py Wed Mar 19 04:23:26 2003
@@ -1 +1,61 @@
+#
+# Copyright (c) 2002, 2003 by Asko Soukka
+#
+# This file is part of Navidoc.
+#
+# Navidoc is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Navidoc is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+# Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General
+# Public License along with Navidoc; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
#
+# Written by Asko Soukka
+#
+
+import docutils.core
+import config
+
+def docutils_system_message(self, level, message, *children, **kwargs):
+ """
+ See docutils.utils.Reporter.system_message()
+ This modified copy redirects docuils system messages
+ to navidoc debug.
+ """
+ attributes = kwargs.copy()
+ category = kwargs.get('category', '')
+ if kwargs.has_key('category'):
+ del attributes['category']
+ if kwargs.has_key('base_node'):
+ source, line = get_source_line(kwargs['base_node'])
+ del attributes['base_node']
+ if source is not None:
+ attributes.setdefault('source', source)
+ if line is not None:
+ attributes.setdefault('line', line)
+ attributes.setdefault('source', self.source)
+ msg = docutils.nodes.system_message(message, level=level,
+ type=self.levels[level],
+ *children, **attributes)
+ debug, report_level, halt_level, stream = self[category].astuple()
+ if level >= report_level or debug and level == 0:
+ if category:
+ config.dbg.out("docutils", msg.astext(), '[%s]' % category)
+ else:
+ config.dbg.out("docutils", msg.astext())
+ if level >= halt_level:
+ raise docutils.utils.SystemMessage(msg)
+ if level > 0 or debug:
+ self.notify_observers(msg)
+ return msg
+docutils.utils.Reporter.system_message = docutils_system_message
Index: navidoc/navidoc/utils/debug.py
diff -u navidoc/navidoc/utils/debug.py:1.4 navidoc/navidoc/utils/debug.py:1.5
--- navidoc/navidoc/utils/debug.py:1.4 Tue Mar 18 11:02:27 2003
+++ navidoc/navidoc/utils/debug.py Wed Mar 19 04:23:26 2003
@@ -44,7 +44,7 @@
def out(self, dbg_name, dbg_str):
if self.output_enabled.has_key(dbg_name):
- print "[", dbg_name, "] :", dbg_str
+ print "[", dbg_name, "]", dbg_str
def shorthand(self, dbg_name):
return lambda dbg_string, self=self, dbg_name=dbg_name: \
Index: navidoc/rst2any.py
diff -u navidoc/rst2any.py:1.6 navidoc/rst2any.py:1.7
--- navidoc/rst2any.py:1.6 Tue Mar 18 11:28:36 2003
+++ navidoc/rst2any.py Wed Mar 19 04:23:26 2003
@@ -27,11 +27,9 @@
__docformat__ = 'reStructuredText'
-import sys, os.path, getopt
-
+import sys, os, getopt
import docutils.core
-
-from navidoc.utils.path import _rstFiles, _slashify, relative_path
+import navidoc
import config
@@ -95,7 +93,6 @@
dbg_path("output file: "+config.output_filename)
args = "--config "+config.docutils+" "+input+' '+output
docutils.core.publish_cmdline(writer_name='latex', argv=args.split())
-
# catching loop parameters from the command line
try: sys.argv.remove('--loop'); loop = 1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] navidoc ./config.py ./docutils.conf ./rst2any.p...,
Asko Soukka <=