summaryrefslogtreecommitdiffstats
path: root/Doc/tools/mkmodindex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-10-30 21:32:40 (GMT)
committerFred Drake <fdrake@acm.org>2002-10-30 21:32:40 (GMT)
commit4a4734927db2c23f2450d49a085c6143014e3bf9 (patch)
tree9fe562c190b7d3ace99d6e174a0c21be9cb25f1f /Doc/tools/mkmodindex
parent8687609a3907cdb18a168d25fe889e628b3a2384 (diff)
downloadcpython-4a4734927db2c23f2450d49a085c6143014e3bf9.zip
cpython-4a4734927db2c23f2450d49a085c6143014e3bf9.tar.gz
cpython-4a4734927db2c23f2450d49a085c6143014e3bf9.tar.bz2
More <link> support for generated pages.
Diffstat (limited to 'Doc/tools/mkmodindex')
-rwxr-xr-xDoc/tools/mkmodindex17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/tools/mkmodindex b/Doc/tools/mkmodindex
index 7d5c682..8e869f9 100755
--- a/Doc/tools/mkmodindex
+++ b/Doc/tools/mkmodindex
@@ -29,6 +29,8 @@ import os
import re
import sys
+from xml.sax.saxutils import quoteattr
+
import buildindex
import support
@@ -49,6 +51,21 @@ class IndexOptions(support.Options):
program = os.path.basename(sys.argv[0])
print __doc__ % {"program": program}
+ links = [
+ ('author', 'acks.html', 'Acknowledgements'),
+ ('help', 'about.html', 'About the Python Documentation'),
+ ]
+
+ def get_header(self):
+ header = support.Options.get_header(self)
+ s = ''
+ for rel, href, title in self.links:
+ s += '<link rel="%s" href="%s"' % (rel, href)
+ if title:
+ s += ' title=' + quoteattr(title)
+ s += '>\n '
+ return header.replace("<link ", s + "<link ", 1)
+
class Node(buildindex.Node):
def __init__(self, link, str, seqno, platinfo):