Mailing List Archive

python/dist/src/Doc/tools prechm.py,1.11,1.12
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv22988/python/Doc/tools

Modified Files:
prechm.py
Log Message:
Move "everything left one": the TOC now shows each doc directory as a
distinct top-level node. Before they were all nested under an artificial
top-level node, uselessly chewing up horizontal space, and ensuring that
the only thing the user saw in the TOC upon opening the file was a single
collapsed top-level folder.


Index: prechm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/prechm.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** prechm.py 20 Apr 2002 20:26:26 -0000 1.11
--- prechm.py 20 Apr 2002 21:34:34 -0000 1.12
***************
*** 69,81 ****
</OBJECT>
<UL>
- <LI><OBJECT type="text/sitemap">
- <param name="Name" value="Python %s Docs">
- <param name="Local" value="./index.html">
- </OBJECT>
- <UL>
'''

contents_footer = '''\
! </UL></UL></BODY></HTML>
'''

--- 69,76 ----
</OBJECT>
<UL>
'''

contents_footer = '''\
! </UL></BODY></HTML>
'''

***************
*** 125,130 ****
# each 'book' : (Dir, Title, First page, Content page, Index page)
supported_libraries = {
! '2.2': ### Beta!!! fix for actual release
[.
Book('.', 'Global Module Index', 'modindex'),
Book('whatsnew', "What's New", 'index', 'contents'),
--- 120,126 ----
# each 'book' : (Dir, Title, First page, Content page, Index page)
supported_libraries = {
! '2.2':
[.
+ Book('.', 'Main page', 'index'),
Book('.', 'Global Module Index', 'modindex'),
Book('whatsnew', "What's New", 'index', 'contents'),
***************
*** 142,145 ****
--- 138,142 ----
'2.1.1':
[.
+ Book('.', 'Main page', 'index'),
Book('.', 'Global Module Index', 'modindex'),
Book('tut','Tutorial','tut','node2'),
***************
*** 342,346 ****

def do_content(library, version, output):
! output.write(contents_header % version)
for book in library:
print '\t', book.title, '-', book.firstpage
--- 339,343 ----

def do_content(library, version, output):
! output.write(contents_header)
for book in library:
print '\t', book.title, '-', book.firstpage
***************
*** 357,360 ****
--- 354,358 ----
def do_project(library, output, arch, version):
output.write(project_template % locals())
+ pathseen = {}
for book in library:
directory = book.directory
***************
*** 362,366 ****
for page in os.listdir(directory):
if page.endswith('.html') or page.endswith('.css'):
! output.write(path % page)

def openfile(file):
--- 360,367 ----
for page in os.listdir(directory):
if page.endswith('.html') or page.endswith('.css'):
! fullpath = path % page
! if fullpath not in pathseen:
! output.write(fullpath)
! pathseen[fullpath] = True

def openfile(file):