diff --git a/Tools/faqwiz/faqmain.py b/Tools/faqwiz/faqmain.py index d105d2c7612..82c4657dc3d 100644 --- a/Tools/faqwiz/faqmain.py +++ b/Tools/faqwiz/faqmain.py @@ -7,7 +7,6 @@ XXX TO DO - next/prev/index links in do_show? -- should have files containing section headers - customize rcs command pathnames - explanation of editing somewhere - various embellishments, GIFs, crosslinks, hints, etc. @@ -28,6 +27,16 @@ NAMEPAT = "faq??.???.htp" NAMEREG = "^faq\([0-9][0-9]\)\.\([0-9][0-9][0-9]\)\.htp$" +SECTIONS = { + "1": "General information and availability", + "2": "Python in the real world", + "3": "Building Python and Other Known Bugs", + "4": "Programming in Python", + "5": "Extending Python", + "6": "Python's design", + "7": "Using Python on non-UNIX platforms", +} + class FAQServer: def __init__(self): @@ -46,7 +55,7 @@ def main(self): KEYS = ['req', 'query', 'name', 'text', 'commit', 'title', 'author', 'email', 'log', 'section', 'number', 'add', - 'version'] + 'version', 'edit'] def __getattr__(self, key): if key not in self.KEYS: @@ -108,7 +117,11 @@ def do_index(self): """ % section section = nsec - print "

Section %s

" % section + if SECTIONS.has_key(section): + stitle = SECTIONS[section] + else: + stitle = "" + print "

Section %s. %s

" % (section, stitle) print "