eric5_doc.py

changeset 3035
36e9f388958b
parent 3034
7ce719013078
child 3060
5883ce99ee12
child 3160
209a07d7e401
equal deleted inserted replaced
3034:7ce719013078 3035:36e9f388958b
120 120
121 def version(): 121 def version():
122 """ 122 """
123 Function to show the version information. 123 Function to show the version information.
124 """ 124 """
125 print("""eric5_doc {0} 125 print(
126 126 """eric5_doc {0}\n"""
127 Eric5 API documentation generator. 127 """\n"""
128 128 """Eric5 API documentation generator.\n"""
129 Copyright (c) 2003-2013 Detlev Offenbach <detlev@die-offenbachs.de> 129 """\n"""
130 This is free software; see the LICENSE.GPL3 for copying conditions. 130 """Copyright (c) 2003-2013 Detlev Offenbach"""
131 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 131 """ <detlev@die-offenbachs.de>\n"""
132 PARTICULAR PURPOSE.""".format(Version)) 132 """This is free software; see the LICENSE.GPL3 for copying"""
133 """ conditions.\n"""
134 """There is NO warranty; not even for MERCHANTABILITY or FITNESS"""
135 """ FOR A\n"""
136 """PARTICULAR PURPOSE.""".format(Version))
133 sys.exit(1) 137 sys.exit(1)
134 138
135 139
136 def main(): 140 def main():
137 """ 141 """
151 "cfheader-color=", "cfheader-background-color=", 155 "cfheader-color=", "cfheader-background-color=",
152 "link-color=", 156 "link-color=",
153 "create-qhp", "qhp-outdir=", "qhp-namespace=", 157 "create-qhp", "qhp-outdir=", "qhp-namespace=",
154 "qhp-virtualfolder=", "qhp-filtername=", "qhp-filterattribs=", 158 "qhp-virtualfolder=", "qhp-filtername=", "qhp-filterattribs=",
155 "qhp-title=", "create-qhc", 159 "qhp-title=", "create-qhc",
156 ]) 160 ])
157 except getopt.error: 161 except getopt.error:
158 usage() 162 usage()
159 163
160 excludeDirs = ["CVS", ".svn", "_svn", ".ropeproject", "_ropeproject", 164 excludeDirs = ["CVS", ".svn", "_svn", ".ropeproject", "_ropeproject",
161 ".eric5project", "_eric5project", "dist", "build", "doc", 165 ".eric5project", "_eric5project", "dist", "build", "doc",
250 usage() 254 usage()
251 255
252 if qtHelpCreation and \ 256 if qtHelpCreation and \
253 (qtHelpNamespace == "" or 257 (qtHelpNamespace == "" or
254 qtHelpFolder == "" or '/' in qtHelpFolder or 258 qtHelpFolder == "" or '/' in qtHelpFolder or
255 qtHelpTitle == ""): 259 qtHelpTitle == ""):
256 usage() 260 usage()
257 261
258 if qtHelpCreation: 262 if qtHelpCreation:
259 from PyQt4.QtCore import QCoreApplication 263 from PyQt4.QtCore import QCoreApplication
260 app = QCoreApplication(sys.argv) # __IGNORE_WARNING__ 264 app = QCoreApplication(sys.argv) # __IGNORE_WARNING__
296 try: 300 try:
297 os.makedirs(qtHelpOutputDir) 301 os.makedirs(qtHelpOutputDir)
298 except EnvironmentError: 302 except EnvironmentError:
299 sys.stderr.write( 303 sys.stderr.write(
300 "Could not create QtHelp output directory {0}.".format( 304 "Could not create QtHelp output directory {0}.".format(
301 qtHelpOutputDir)) 305 qtHelpOutputDir))
302 sys.exit(2) 306 sys.exit(2)
303 else: 307 else:
304 qtHelpOutputDir = os.getcwd() 308 qtHelpOutputDir = os.getcwd()
305 qtHelpOutputDir = os.path.abspath(qtHelpOutputDir) 309 qtHelpOutputDir = os.path.abspath(qtHelpOutputDir)
306 310

eric ide

mercurial