[pywin32-checkins] pywin32/AutoDuck Dump2HHC.py,1.5,1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2004-09-11 07:39:54
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8085 Modified Files: Dump2HHC.py Log Message: HAve constants correctly split into categories. Index: Dump2HHC.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/Dump2HHC.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Dump2HHC.py 7 Sep 2004 22:17:00 -0000 1.5 --- Dump2HHC.py 11 Sep 2004 07:39:43 -0000 1.6 *************** *** 23,26 **** --- 23,27 ---- self.overviewTopics = {} self.extOverviewTopics = {} + self.constants = {} def process(self): *************** *** 81,85 **** # tagnames we care about: ! lTags = ["module", "object", "topic"] line = input.readline() if line == '': --- 82,86 ---- # tagnames we care about: ! lTags = ["module", "object", "topic", "const"] line = input.readline() if line == '': *************** *** 136,141 **** elif top.type == "topic": d = cat.overviewTopics ! assert not d.has_key(top.name), "Duplicate named module/object/topic detected: " + top.name # Skip the property fields line for module/object --- 137,147 ---- elif top.type == "topic": d = cat.overviewTopics + elif top.type == "const": + d = cat.constants + else: + raise RuntimeError, "What is '%s'" % (top.type,) ! if d.has_key(top.name): ! print "Duplicate named %s detected: %s" % (top.type, top.name) # Skip the property fields line for module/object *************** *** 245,250 **** _genOneCategoryHTML(output_dir, cat, "Modules", "_modules", cat.modules) _genOneCategoryHTML(output_dir, cat, "Objects", "_objects", cat.objects) ! def _genItemsFromDict(dict, cat, output, target): CHM = "mk:@MSITStore:%s.chm::/" % target keys = dict.keys() --- 251,257 ---- _genOneCategoryHTML(output_dir, cat, "Modules", "_modules", cat.modules) _genOneCategoryHTML(output_dir, cat, "Objects", "_objects", cat.objects) + _genOneCategoryHTML(output_dir, cat, "Constants", "_constants", cat.constants) ! def _genItemsFromDict(dict, cat, output, target, do_children = 1): CHM = "mk:@MSITStore:%s.chm::/" % target keys = dict.keys() *************** *** 260,263 **** --- 267,272 ---- </OBJECT> ''' % locals()) + if not do_children: + continue if len(dict[k].contains) > 0: output.write("<UL>") *************** *** 339,343 **** </OBJECT> <UL>''' % locals()) ! _genItemsFromDict(cat.objects, cat, output, target) output.write(''' </UL>''') --- 348,353 ---- </OBJECT> <UL>''' % locals()) ! # Dont show 'children' for objects - params etc don't need their own child nodes! ! _genItemsFromDict(cat.objects, cat, output, target, do_children=0) output.write(''' </UL>''') *************** *** 347,353 **** <param name="Name" value="Constants"> <param name="ImageNumber" value="1"> ! <param name="Local" value="%(CHM)sconstants.html"> </OBJECT> ! ''' % { "CHM" : CHM}) # Finish this category output.write(''' --- 357,367 ---- <param name="Name" value="Constants"> <param name="ImageNumber" value="1"> ! <param name="Local" value="%(CHM)s%(cat_id)s_constants.html"> </OBJECT> ! <UL> ! ''' % locals()) ! _genItemsFromDict(cat.constants, cat, output, target) ! output.write(""" ! </UL>""") # Finish this category output.write(''' |