DocumentationTools/IndexGenerator.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2989
7efa8b8b6903
child 3060
5883ce99ee12
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
2 2
3 # Copyright (c) 2003 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2003 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the index generator for the builtin documentation generator. 7 Module implementing the index generator for the builtin documentation
8 generator.
8 """ 9 """
9 10
10 from __future__ import unicode_literals # __IGNORE_WARNING__ 11 from __future__ import unicode_literals # __IGNORE_WARNING__
11 12
12 import sys 13 import sys
15 from Utilities import joinext 16 from Utilities import joinext
16 17
17 18
18 class IndexGenerator(object): 19 class IndexGenerator(object):
19 """ 20 """
20 Class implementing the index generator for the builtin documentation generator. 21 Class implementing the index generator for the builtin documentation
22 generator.
21 """ 23 """
22 def __init__(self, outputDir, colors, stylesheet=None): 24 def __init__(self, outputDir, colors, stylesheet=None):
23 """ 25 """
24 Constructor 26 Constructor
25 27
47 self.indexBodyTemplate = TemplatesListsStyleCSS.indexBodyTemplate 49 self.indexBodyTemplate = TemplatesListsStyleCSS.indexBodyTemplate
48 self.indexListPackagesTemplate = \ 50 self.indexListPackagesTemplate = \
49 TemplatesListsStyleCSS.indexListPackagesTemplate 51 TemplatesListsStyleCSS.indexListPackagesTemplate
50 self.indexListModulesTemplate = \ 52 self.indexListModulesTemplate = \
51 TemplatesListsStyleCSS.indexListModulesTemplate 53 TemplatesListsStyleCSS.indexListModulesTemplate
52 self.indexListEntryTemplate = TemplatesListsStyleCSS.indexListEntryTemplate 54 self.indexListEntryTemplate = \
55 TemplatesListsStyleCSS.indexListEntryTemplate
53 else: 56 else:
54 from . import TemplatesListsStyle 57 from . import TemplatesListsStyle
55 self.headerTemplate = TemplatesListsStyle.headerTemplate.format(**colors) 58 self.headerTemplate = \
56 self.footerTemplate = TemplatesListsStyle.footerTemplate.format(**colors) 59 TemplatesListsStyle.headerTemplate.format(**colors)
60 self.footerTemplate = \
61 TemplatesListsStyle.footerTemplate.format(**colors)
57 self.indexBodyTemplate = \ 62 self.indexBodyTemplate = \
58 TemplatesListsStyle.indexBodyTemplate.format(**colors) 63 TemplatesListsStyle.indexBodyTemplate.format(**colors)
59 self.indexListPackagesTemplate = \ 64 self.indexListPackagesTemplate = \
60 TemplatesListsStyle.indexListPackagesTemplate.format(**colors) 65 TemplatesListsStyle.indexListPackagesTemplate.format(**colors)
61 self.indexListModulesTemplate = \ 66 self.indexListModulesTemplate = \

eric ide

mercurial