From: David G. <go...@us...> - 2002-10-18 05:10:37
|
Update of /cvsroot/docutils/sandbox/aahz/OO In directory usw-pr-cvs1:/tmp/cvs-serv17911/aahz/OO Modified Files: OOdirectives.py OOwriter.py open_office.py publish.py Log Message: Refactored names (options -> settings; etc.); updated. Index: OOdirectives.py =================================================================== RCS file: /cvsroot/docutils/sandbox/aahz/OO/OOdirectives.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- OOdirectives.py 17 Oct 2002 14:35:52 -0000 1.1 +++ OOdirectives.py 18 Oct 2002 05:10:32 -0000 1.2 @@ -28,10 +28,10 @@ def include_code(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): - print >> sys.stderr, state_machine.document.options._source + print >> sys.stderr, state_machine.document.settings._source return [] document = state_machine.document - source = document.options._source + source = document.settings._source if source is not None: if has_attr( Index: OOwriter.py =================================================================== RCS file: /cvsroot/docutils/sandbox/aahz/OO/OOwriter.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- OOwriter.py 17 Oct 2002 14:35:52 -0000 1.1 +++ OOwriter.py 18 Oct 2002 05:10:32 -0000 1.2 @@ -60,7 +60,7 @@ def __init__(self, document): nodes.NodeVisitor.__init__(self, document) - self.options = options = document.options + self.settings = settings = document.settings self.body = [] self.section_level = 0 @@ -257,7 +257,7 @@ old_compact_simple = self.compact_simple self.context.append((self.compact_simple, self.compact_p)) self.compact_p = None - self.compact_simple = (self.options.compact_lists and + self.compact_simple = (self.settings.compact_lists and (self.compact_simple or self.topic_class == 'contents' or self.check_simple_list(node))) @@ -327,7 +327,7 @@ raise nodes.SkipNode def footnote_backrefs(self, node): - if self.options.footnote_backlinks and node.hasattr('backrefs'): + if self.settings.footnote_backlinks and node.hasattr('backrefs'): backrefs = node['backrefs'] if len(backrefs) == 1: self.context.append('') Index: open_office.py =================================================================== RCS file: /cvsroot/docutils/sandbox/aahz/OO/open_office.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- open_office.py 17 Oct 2002 14:35:52 -0000 1.1 +++ open_office.py 18 Oct 2002 05:10:32 -0000 1.2 @@ -10,9 +10,9 @@ pub = core.Publisher(writer=OOwriter.Writer()) pub.set_reader('standalone', None, 'restructuredtext') -options = pub.set_options() -pub.source = io.FileInput(options, source_path=sys.argv[1]) -pub.destination = io.StringOutput(options) +settings = pub.get_settings() +pub.source = io.FileInput(settings, source_path=sys.argv[1]) +pub.destination = io.StringOutput(settings) content = pub.publish() manifest_list = [ Index: publish.py =================================================================== RCS file: /cvsroot/docutils/sandbox/aahz/OO/publish.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- publish.py 17 Oct 2002 14:35:52 -0000 1.1 +++ publish.py 18 Oct 2002 05:10:32 -0000 1.2 @@ -16,7 +16,7 @@ except: pass -from docutils.core import publish, default_description +from docutils.core import publish_cmdline, default_description import OOdirectives @@ -24,4 +24,4 @@ description = ('Generates pseudo-XML from standalone reStructuredText ' 'sources (for testing purposes). ' + default_description) -publish(description=description) +publish_cmdline(description=description) |