[Python-checkins] r56641 - in doctools/trunk/converter: filenamemap.py newfiles/TODO newfiles/doc_markup.rst restwriter.py

georg.brandl python-checkins at python.org
Wed Aug 1 14:46:17 CEST 2007


Author: georg.brandl
Date: Wed Aug 1 14:46:16 2007
New Revision: 56641
Modified:
 doctools/trunk/converter/filenamemap.py
 doctools/trunk/converter/newfiles/TODO
 doctools/trunk/converter/newfiles/doc_markup.rst
 doctools/trunk/converter/restwriter.py
Log:
Get rid of the remaining warnings in the conversion.
Modified: doctools/trunk/converter/filenamemap.py
==============================================================================
--- doctools/trunk/converter/filenamemap.py	(original)
+++ doctools/trunk/converter/filenamemap.py	Wed Aug 1 14:46:16 2007
@@ -546,6 +546,7 @@
 toctree_mapping = {
 'mac/scripting': ['gensuitemodule', 'aetools', 'aepack', 'aetypes', 'miniae'],
 'mac/toolbox': ['colorpicker'],
+ 'mac/undoc': [],
 'lib/libstrings': ['string', 're', 'struct', 'difflib', 'stringio', 'textwrap',
 'codecs', 'unicodedata', 'stringprep', 'fpformat'],
 'lib/datatypes': ['datetime', 'calendar', 'collections', 'heapq', 'bisect',
@@ -601,6 +602,7 @@
 'lib/libsgi': ['al', 'cd', 'fl', 'fm', 'gl', 'imgfile', 'jpeg'],
 'lib/libsun': ['sunaudio'],
 'lib/windows': ['msilib', 'msvcrt', '_winreg', 'winsound'],
+ 'lib/tkinter': [],
 }
 
 # map sourcefilename to [pre, post]
Modified: doctools/trunk/converter/newfiles/TODO
==============================================================================
--- doctools/trunk/converter/newfiles/TODO	(original)
+++ doctools/trunk/converter/newfiles/TODO	Wed Aug 1 14:46:16 2007
@@ -14,5 +14,5 @@
 * write "About these documents"
 * finish "Documenting Python"
 * extend copyright.rst
-* merge ACKS into about.rst
 * fix the "quadruple" index term
+* fix :file: and |version| in install
\ No newline at end of file
Modified: doctools/trunk/converter/newfiles/doc_markup.rst
==============================================================================
--- doctools/trunk/converter/newfiles/doc_markup.rst	(original)
+++ doctools/trunk/converter/newfiles/doc_markup.rst	Wed Aug 1 14:46:16 2007
@@ -368,8 +368,6 @@
 
 The name of a file or directory.
 
-.. XXX: filenq, filevar
-
 .. describe:: guilabel
 
 Labels presented as part of an interactive user interface should be marked
Modified: doctools/trunk/converter/restwriter.py
==============================================================================
--- doctools/trunk/converter/restwriter.py	(original)
+++ doctools/trunk/converter/restwriter.py	Wed Aug 1 14:46:16 2007
@@ -332,6 +332,8 @@
 # loses comments, but huh
 return EmptyNode()
 if isinstance(subnode, InlineNode):
+ if subnode.cmdname in ('filevar', 'envvar'):
+ return NodeList([TextNode('{'), do(subnode.args[0]), TextNode('}')])
 if subnode.cmdname == 'optional':
 # this is not mapped to ReST markup
 return subnode
@@ -639,7 +641,7 @@
 self.write_directive('deprecated', text(node.args[0]), node.args[1],
 spbelow=False)
 elif cmdname == 'localmoduletable':
- if self.toctree:
+ if self.toctree is not None:
 self.write_directive('toctree', '', spbelow=True, spabove=True)
 with self.indented():
 for entry in self.toctree:
@@ -830,7 +832,7 @@
 
 # maps argumentless commands to text
 simplecmd_mapping = {
- 'NULL': '`NULL`',
+ 'NULL': '*NULL*',
 'shortversion': '|version|',
 'version': '|release|',
 'today': '|today|',
@@ -848,6 +850,7 @@
 'method': 'meth',
 'module': 'mod',
 'programopt': 'option',
+ 'filenq': 'file',
 # these mean: no change
 'cdata': '',
 'class': '',
@@ -857,8 +860,6 @@
 'dfn': '',
 'envvar': '',
 'file': '',
- 'filenq': '',
- 'filevar': '',
 'guilabel': '',
 'kbd': '',
 'keyword': '',
@@ -890,7 +891,7 @@
 if cmdname in ('code', 'bfcode', 'samp', 'texttt', 'regexp'):
 self.visit_wrapped('``', self.get_textonly_node(content, 'code',
 warn=1), '``', noescape=True)
- elif cmdname in ('emph', 'textit'):
+ elif cmdname in ('emph', 'textit', 'var'):
 self.visit_wrapped('*', self.get_textonly_node(content, 'emph',
 warn=1), '*')
 elif cmdname in ('strong', 'textbf'):
@@ -898,7 +899,7 @@
 warn=1), '**')
 elif cmdname in ('b', 'textrm', 'email'):
 self.visit_node(content)
- elif cmdname in ('var', 'token'):
+ elif cmdname == 'token':
 # \token appears in productionlists only
 self.visit_wrapped('`', self.get_textonly_node(content, 'var',
 warn=1), '`')
@@ -948,11 +949,13 @@
 self.visit_wrapped('(', node.args[1], ')')
 elif cmdname == 'longprogramopt':
 self.visit_wrapped(':option:`--', content, '`')
+ elif cmdname == 'filevar':
+ self.visit_wrapped(':file:`{', content, '}`')
 elif cmdname == '':
 self.visit_node(content)
 # stray commands from distutils
 elif cmdname in ('argument name', 'value', 'attribute', 'option name'):
- self.visit_wrapped('`', content, '`')
+ self.visit_wrapped('*', content, '*')
 else:
 self.visit_wrapped(':%s:`' % (self.role_mapping[cmdname] or cmdname),
 self.get_textonly_node(


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /