1. WAKAYAMA shirou
  2. sphinx


georg.brandl  committed f219b4f

Rename modules -> library, macmodules -> maclib. Use current version in index page whatsnew link.

  • Participants
  • Parent commits 1f22e25
  • Branches default

Comments (0)

Files changed (14)


View file
 - discuss and debug comments system
 - write new Makefile, handle automatic checkout
 - write a "printable" builder (export to latex, most probably)
-- discuss lib -> ref section move
 - prepare for databases other than sqlite for comments
 - look at the old tools/ scripts, what functionality should be rewritten
 - add search via Xapian?

File converter/filenamemap.py

View file
 _mapping = {
     'lib': {
-        '__newname__' : 'modules',
+        '__newname__' : 'library',
         'asttable': '',
         'compiler': '',
         'libundoc': '',
         'libintro': '',
-        # -> ref
-        'libconsts': 'reference/consts',
-        'libexcs': 'reference/exceptions',
-        'libfuncs': 'reference/functions',
-        'libobjs': 'reference/objects',
-        'libstdtypes': 'reference/stdtypes',
+        'libconsts': 'constants',
+        'libexcs': 'exceptions',
+        'libfuncs': 'functions',
+        'libobjs': 'objects',
+        'libstdtypes': 'stdtypes',
         # mainfiles
         'lib': None,
     'mac': {
-        '__newname__': 'macmodules',
+        '__newname__': 'maclib',
         'mac': None,
         'libaepack': 'aepack',
         'whatsnew24': '2.4',
         'whatsnew25': '2.5',
         'whatsnew26': '2.6',
+        'whatsnew30': '3.0',
     'commontex': {
-    'macmodules',
-    'modules',
+    'maclib',
+    'library',
     'ref_index.rst': 'reference/index.rst',
     'tutorial_index.rst': 'tutorial/index.rst',
-    'modules_index.rst': 'modules/index.rst',
-    'mac_index.rst': 'macmodules/index.rst',
+    'modules_index.rst': 'library/index.rst',
+    'mac_index.rst': 'maclib/index.rst',
     'ext_index.rst': 'extending/index.rst',
     'api_index.rst': 'c-api/index.rst',
     'dist_index.rst': 'distutils/index.rst',

File converter/newfiles/conf.py

View file
-    'macmodules/scrap.rst',
-    'modules/xmllib.rst',
+    'maclib/scrap.rst',
+    'library/xmllib.rst',
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,

File converter/newfiles/contents.rst

View file
-   modules/index.rst
-   macmodules/index.rst
+   library/index.rst
+   maclib/index.rst

File converter/newfiles/mac_index.rst

View file
-.. _macmodules-index:
+.. _maclib-index:
   Macintosh Library Modules
 :Date: |today|
 This library reference manual documents Python's extensions for the Macintosh.
-It should be used in conjunction with :ref:`modules-index`, which documents the
+It should be used in conjunction with :ref:`library-index`, which documents the
 standard library and built-in types.
 This manual assumes basic knowledge about the Python language.  For an informal

File converter/newfiles/modules_index.rst

View file
-.. _modules-index:
+.. _library-index:
   The Python standard library
    :maxdepth: 2
+   functions.rst
+   constants.rst
+   objects.rst
+   stdtypes.rst
+   exceptions.rst

File converter/newfiles/ref_index.rst

View file
 This reference manual describes the syntax and "core semantics" of the
 language. It is terse, but attempts to be exact and complete. The semantics of
 non-essential built-in object types and of the built-in functions and modules
-are described in :ref:`modules-index`. For an informal introduction to the
+are described in :ref:`library-index`. For an informal introduction to the
 language, see :ref:`tutorial-index`. For C or C++ programmers, two additional
 manuals exist: :ref:`extending-index` describes the high-level picture of how to
 write a Python extension module, and the :ref:`c-api-index` describes the
-   functions.rst
-   consts.rst
-   objects.rst
-   stdtypes.rst
-   exceptions.rst

File sphinx/builder.py

View file
             last_updated = self.last_updated,
             builder = self.name,
             release = self.config['release'],
+            version = self.config['version'],
             parents = [],
             len = len,
             titles = {},

File sphinx/style/searchtools.js

View file
             // auto default
             if (areas.length == 1 && areas[0] == 'default') {
-                areas = ['tutorial', 'modules', 'install', 'distutils'];
+                areas = ['tutorial', 'library', 'install', 'distutils'];
             // update input fields
 $(document).ready(function() {
-    });
+    });

File sphinx/templates/index.html

View file
   <p><strong>Parts of the documentation:</strong></p>
   <table class="contentstable" align="center"><tr>
     <td width="50%">
-      <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/2.6.rst") }}">What's new in Python 2.6?</a><br>
+      <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version + ".rst") }}">What's new in Python {{ version }}?</a><br>
          <span class="linkdescr">changes since previous major release</span></p>
       <p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index.rst") }}">Tutorial</a><br>
          <span class="linkdescr">start here</span></p>
       <p class="biglink"><a class="biglink" href="{{ pathto("reference/index.rst") }}">Language Reference</a><br>
-         <span class="linkdescr">describes syntax, language elements and builtins</span></p>
-      <p class="biglink"><a class="biglink" href="{{ pathto("modules/index.rst") }}">Library Reference</a><br>
+         <span class="linkdescr">describes syntax and language elements</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("library/index.rst") }}">Library Reference</a><br>
          <span class="linkdescr">keep this under your pillow</span></p>
-      <p class="biglink"><a class="biglink" href="{{ pathto("macmodules/index.rst") }}">Macintosh Library Modules</a><br>
+      <p class="biglink"><a class="biglink" href="{{ pathto("maclib/index.rst") }}">Macintosh Library Modules</a><br>
          <span class="linkdescr">this too, if you use a Macintosh</span></p>
     </td><td width="50%">
       <p class="biglink"><a class="biglink" href="{{ pathto("extending/index.rst") }}">Extending and Embedding</a><br>

File sphinx/templates/keyword_not_found.html

View file
     For a quick overview over all documented modules,
-    <a href="{{ pathto('modules/index.rst') }}">click here</a>.
+    <a href="{{ pathto('library/index.rst') }}">click here</a>.
 {% endblock %}

File sphinx/templates/search.html

View file
     <ul class="fakelist">
     {% for id, name, checked in [
       ('tutorial', 'Python Tutorial', true),
-      ('modules', 'Library Reference', true),
-      ('macmodules', 'Macintosh Library Modules', false),
+      ('library', 'Library Reference', true),
+      ('maclib', 'Macintosh Library Modules', false),
       ('extending', 'Extending and Embedding', false),
       ('c-api', 'Python/C API', false),
       ('install', 'Installing Python Modules', true),

File sphinx/web/application.py

View file
         Find keyword matches. If there is an exact match, just redirect:
         http://docs.python.org/os.path.exists would automatically
-        redirect to http://docs.python.org/modules/os.path/#os.path.exists.
+        redirect to http://docs.python.org/library/os.path/#os.path.exists.
         Else, show a page with close matches.
         Module references are processed first so that "os.path" is handled as

File sphinx/web/oldurls.py

View file
             return 'bugs/'
         if url == 'modindex.html' or url.endswith('/modindex.html'):
             return 'modindex/'
-        # modules, macmodules
+        # library, maclib
         if url[:4] in ('lib/', 'mac/'):
-            p = '' if url[0] == 'l' else 'mac'
+            p = 'library/' if url[0] == 'l' else 'maclib/'
             m = _module_re.match(url[4:])
             if m:
                 mn = m.group(1)
-                return p + 'modules/' + special_module_names.get(mn, mn)
+                return p + special_module_names.get(mn, mn)
             # module sub-pages
             m = _modsub_re.match(url[4:])
             if m and not _modobj_re.match(url[4:]):
                 mn = m.group(1)
-                return p + 'modules/' + special_module_names.get(mn, mn)
+                return p + special_module_names.get(mn, mn)
         # XXX: handle all others
         # tutorial
         elif url[:4] == 'tut/':