Anonymous avatar Anonymous committed c7d4b94

Get rid of the remaining warnings in the conversion.

Comments (0)

Files changed (4)

converter/filenamemap.py

 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',
     '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]

converter/newfiles/TODO

 * 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

converter/newfiles/doc_markup.rst

 
    The name of a file or directory.
 
-.. XXX: filenq, filevar
-
 .. describe:: guilabel
 
    Labels presented as part of an interactive user interface should be marked

converter/restwriter.py

                 # 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
             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:
 
     # maps argumentless commands to text
     simplecmd_mapping = {
-        'NULL': '`NULL`',
+        'NULL': '*NULL*',
         'shortversion': '|version|',
         'version': '|release|',
         'today': '|today|',
         'method': 'meth',
         'module': 'mod',
         'programopt': 'option',
+        'filenq': 'file',
         # these mean: no change
         'cdata': '',
         'class': '',
         'dfn': '',
         'envvar': '',
         'file': '',
-        'filenq': '',
-        'filevar': '',
         'guilabel': '',
         'kbd': '',
         'keyword': '',
         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'):
                                                             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), '`')
             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(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.