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 import sys |
11 import sys |
11 import os |
12 import os |
12 |
13 |
13 from Utilities import joinext |
14 from Utilities import joinext |
14 |
15 |
15 |
16 |
16 class IndexGenerator(object): |
17 class IndexGenerator(object): |
17 """ |
18 """ |
18 Class implementing the index generator for the builtin documentation generator. |
19 Class implementing the index generator for the builtin documentation |
|
20 generator. |
19 """ |
21 """ |
20 def __init__(self, outputDir, colors, stylesheet=None): |
22 def __init__(self, outputDir, colors, stylesheet=None): |
21 """ |
23 """ |
22 Constructor |
24 Constructor |
23 |
25 |
45 self.indexBodyTemplate = TemplatesListsStyleCSS.indexBodyTemplate |
47 self.indexBodyTemplate = TemplatesListsStyleCSS.indexBodyTemplate |
46 self.indexListPackagesTemplate = \ |
48 self.indexListPackagesTemplate = \ |
47 TemplatesListsStyleCSS.indexListPackagesTemplate |
49 TemplatesListsStyleCSS.indexListPackagesTemplate |
48 self.indexListModulesTemplate = \ |
50 self.indexListModulesTemplate = \ |
49 TemplatesListsStyleCSS.indexListModulesTemplate |
51 TemplatesListsStyleCSS.indexListModulesTemplate |
50 self.indexListEntryTemplate = TemplatesListsStyleCSS.indexListEntryTemplate |
52 self.indexListEntryTemplate = \ |
|
53 TemplatesListsStyleCSS.indexListEntryTemplate |
51 else: |
54 else: |
52 from . import TemplatesListsStyle |
55 from . import TemplatesListsStyle |
53 self.headerTemplate = TemplatesListsStyle.headerTemplate.format(**colors) |
56 self.headerTemplate = \ |
54 self.footerTemplate = TemplatesListsStyle.footerTemplate.format(**colors) |
57 TemplatesListsStyle.headerTemplate.format(**colors) |
|
58 self.footerTemplate = \ |
|
59 TemplatesListsStyle.footerTemplate.format(**colors) |
55 self.indexBodyTemplate = \ |
60 self.indexBodyTemplate = \ |
56 TemplatesListsStyle.indexBodyTemplate.format(**colors) |
61 TemplatesListsStyle.indexBodyTemplate.format(**colors) |
57 self.indexListPackagesTemplate = \ |
62 self.indexListPackagesTemplate = \ |
58 TemplatesListsStyle.indexListPackagesTemplate.format(**colors) |
63 TemplatesListsStyle.indexListPackagesTemplate.format(**colors) |
59 self.indexListModulesTemplate = \ |
64 self.indexListModulesTemplate = \ |