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

This commit is contained in:
Georg Brandl 2007-08-02 08:54:17 +00:00
parent 8f842f5ace
commit 0a42ade463
14 changed files with 42 additions and 40 deletions

1
TODO
View File

@ -5,7 +5,6 @@ Global TODO
- 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?

View File

@ -12,7 +12,7 @@
_mapping = {
'lib': {
'__newname__' : 'modules',
'__newname__' : 'library',
'asttable': '',
'compiler': '',
@ -271,12 +271,11 @@ _mapping = {
'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,
@ -374,7 +373,7 @@ _mapping = {
},
'mac': {
'__newname__': 'macmodules',
'__newname__': 'maclib',
'mac': None,
'libaepack': 'aepack',
@ -413,6 +412,7 @@ _mapping = {
'whatsnew24': '2.4',
'whatsnew25': '2.5',
'whatsnew26': '2.6',
'whatsnew30': '3.0',
},
'commontex': {
@ -449,8 +449,8 @@ dirs_to_make = [
'includes',
'includes/sqlite3',
'install',
'macmodules',
'modules',
'maclib',
'library',
'reference',
'tutorial',
'whatsnew',
@ -482,8 +482,8 @@ newfiles_mapping = {
'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',

View File

@ -31,8 +31,8 @@ unused_files = [
'whatsnew/2.3.rst',
'whatsnew/2.4.rst',
'whatsnew/2.5.rst',
'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,

View File

@ -7,8 +7,8 @@
whatsnew/2.6.rst
tutorial/index.rst
reference/index.rst
modules/index.rst
macmodules/index.rst
library/index.rst
maclib/index.rst
extending/index.rst
c-api/index.rst
distutils/index.rst

View File

@ -1,4 +1,4 @@
.. _macmodules-index:
.. _maclib-index:
##############################
Macintosh Library Modules
@ -8,7 +8,7 @@
: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

View File

@ -1,4 +1,4 @@
.. _modules-index:
.. _library-index:
###############################
The Python standard library
@ -29,6 +29,12 @@ documented in the Reference Manual.
:maxdepth: 2
intro.rst
functions.rst
constants.rst
objects.rst
stdtypes.rst
exceptions.rst
strings.rst
datatypes.rst
numeric.rst

View File

@ -10,7 +10,7 @@
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
@ -27,8 +27,4 @@ interfaces available to C/C++ programmers in detail.
simple_stmts.rst
compound_stmts.rst
toplevel_components.rst
functions.rst
consts.rst
objects.rst
stdtypes.rst
exceptions.rst

View File

@ -324,6 +324,7 @@ class StandaloneHTMLBuilder(Builder):
last_updated = self.last_updated,
builder = self.name,
release = self.config['release'],
version = self.config['version'],
parents = [],
len = len,
titles = {},

View File

@ -232,7 +232,7 @@ var Search = {
// auto default
if (areas.length == 1 && areas[0] == 'default') {
areas = ['tutorial', 'modules', 'install', 'distutils'];
areas = ['tutorial', 'library', 'install', 'distutils'];
}
// update input fields
@ -425,4 +425,4 @@ var Search = {
$(document).ready(function() {
Documentation.Search.init();
});
});

View File

@ -14,15 +14,15 @@
<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>

View File

@ -26,6 +26,6 @@
</p>
<p>
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>.
</p>
{% endblock %}

View File

@ -24,8 +24,8 @@
<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),

View File

@ -590,7 +590,7 @@ class DocumentationApplication(object):
"""
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

View File

@ -60,18 +60,18 @@ def handle_html_url(req, url):
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/':