3 |
3 |
4 # Copyright (c) 2003 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # Copyright (c) 2003 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
5 # |
5 # |
6 |
6 |
7 """ |
7 """ |
8 Eric5 Documentation Generator. |
8 Eric6 Documentation Generator. |
9 |
9 |
10 This is the main Python script of the documentation generator. It is |
10 This is the main Python script of the documentation generator. It is |
11 this script that gets called via the source documentation interface. |
11 this script that gets called via the source documentation interface. |
12 This script can be used via the commandline as well. |
12 This script can be used via the commandline as well. |
13 """ |
13 """ |
25 |
25 |
26 import Utilities.ModuleParser |
26 import Utilities.ModuleParser |
27 from DocumentationTools.ModuleDocumentor import ModuleDocument |
27 from DocumentationTools.ModuleDocumentor import ModuleDocument |
28 from DocumentationTools.IndexGenerator import IndexGenerator |
28 from DocumentationTools.IndexGenerator import IndexGenerator |
29 from DocumentationTools.QtHelpGenerator import QtHelpGenerator |
29 from DocumentationTools.QtHelpGenerator import QtHelpGenerator |
30 from DocumentationTools.Config import eric5docDefaultColors |
30 from DocumentationTools.Config import eric6docDefaultColors |
31 from UI.Info import Version |
31 from UI.Info import Version |
32 import Utilities |
32 import Utilities |
33 |
33 |
34 # list of supported filename extensions |
34 # list of supported filename extensions |
35 supportedExtensions = [".py", ".pyw", ".ptl", ".rb"] |
35 supportedExtensions = [".py", ".pyw", ".ptl", ".rb"] |
40 Function to print some usage information. |
40 Function to print some usage information. |
41 |
41 |
42 It prints a reference of all commandline parameters that may |
42 It prints a reference of all commandline parameters that may |
43 be used and ends the application. |
43 be used and ends the application. |
44 """ |
44 """ |
45 print("eric5_doc") |
45 print("eric6_doc") |
46 print() |
46 print() |
47 print("Copyright (c) 2003 - 2014 Detlev Offenbach" |
47 print("Copyright (c) 2003 - 2014 Detlev Offenbach" |
48 " <detlev@die-offenbachs.de>.") |
48 " <detlev@die-offenbachs.de>.") |
49 print() |
49 print() |
50 print("Usage:") |
50 print("Usage:") |
51 print() |
51 print() |
52 print(" eric5_doc [options] files...") |
52 print(" eric6_doc [options] files...") |
53 print() |
53 print() |
54 print("where files can be either python modules, package") |
54 print("where files can be either python modules, package") |
55 print("directories or ordinary directories.") |
55 print("directories or ordinary directories.") |
56 print() |
56 print() |
57 print("Options:") |
57 print("Options:") |
127 def version(): |
127 def version(): |
128 """ |
128 """ |
129 Function to show the version information. |
129 Function to show the version information. |
130 """ |
130 """ |
131 print( |
131 print( |
132 """eric5_doc {0}\n""" |
132 """eric6_doc {0}\n""" |
133 """\n""" |
133 """\n""" |
134 """Eric5 API documentation generator.\n""" |
134 """Eric6 API documentation generator.\n""" |
135 """\n""" |
135 """\n""" |
136 """Copyright (c) 2003-2014 Detlev Offenbach""" |
136 """Copyright (c) 2003-2014 Detlev Offenbach""" |
137 """ <detlev@die-offenbachs.de>\n""" |
137 """ <detlev@die-offenbachs.de>\n""" |
138 """This is free software; see the LICENSE.GPL3 for copying""" |
138 """This is free software; see the LICENSE.GPL3 for copying""" |
139 """ conditions.\n""" |
139 """ conditions.\n""" |
166 ]) |
166 ]) |
167 except getopt.error: |
167 except getopt.error: |
168 usage() |
168 usage() |
169 |
169 |
170 excludeDirs = ["CVS", ".svn", "_svn", ".ropeproject", "_ropeproject", |
170 excludeDirs = ["CVS", ".svn", "_svn", ".ropeproject", "_ropeproject", |
171 ".eric5project", "_eric5project", "dist", "build", "doc", |
171 ".eric6project", "_eric6project", "dist", "build", "doc", |
172 "docs"] |
172 "docs"] |
173 excludePatterns = [] |
173 excludePatterns = [] |
174 outputDir = "doc" |
174 outputDir = "doc" |
175 recursive = False |
175 recursive = False |
176 doIndex = True |
176 doIndex = True |
177 noempty = False |
177 noempty = False |
178 newline = None |
178 newline = None |
179 |
179 |
180 stylesheetFile = "" |
180 stylesheetFile = "" |
181 colors = eric5docDefaultColors.copy() |
181 colors = eric6docDefaultColors.copy() |
182 |
182 |
183 qtHelpCreation = False |
183 qtHelpCreation = False |
184 qtHelpOutputDir = "help" |
184 qtHelpOutputDir = "help" |
185 qtHelpNamespace = "" |
185 qtHelpNamespace = "" |
186 qtHelpFolder = "source" |
186 qtHelpFolder = "source" |