--- a/eric5_doc.py Tue Oct 15 22:03:54 2013 +0200 +++ b/eric5_doc.py Fri Oct 18 23:00:41 2013 +0200 @@ -5,7 +5,7 @@ # """ -Eric5 Documentation Generator +Eric5 Documentation Generator. This is the main Python script of the documentation generator. It is this script that gets called via the source documentation interface. @@ -47,7 +47,8 @@ """ print("eric5_doc") print() - print("Copyright (c) 2003 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>.") + print("Copyright (c) 2003 - 2013 Detlev Offenbach" + " <detlev@die-offenbachs.de>.") print() print("Usage:") print() @@ -100,7 +101,8 @@ print(" --cfheader-color=color") print(" Specify the text color of class and function headers.") print(" --cfheader-background-color=color") - print(" Specify the text background color of class and function headers.") + print(" Specify the text background color of class and" + " function headers.") print(" --link-color=color") print(" Specify the text color of hyperlinks.") print() @@ -144,7 +146,6 @@ """ Main entry point into the application. """ - import getopt try: @@ -165,7 +166,8 @@ usage() excludeDirs = ["CVS", ".svn", "_svn", ".ropeproject", "_ropeproject", - ".eric5project", "_eric5project", "dist", "build", "doc", "docs"] + ".eric5project", "_eric5project", "dist", "build", "doc", + "docs"] excludePatterns = [] outputDir = "doc" recursive = False @@ -287,7 +289,8 @@ sf.close() except IOError: sys.stderr.write( - "The CSS stylesheet '{0}' does not exist\n".format(stylesheetFile)) + "The CSS stylesheet '{0}' does not exist\n".format( + stylesheetFile)) sys.stderr.write("Disabling CSS usage.\n") stylesheet = None else: @@ -310,17 +313,20 @@ qtHelpOutputDir = os.path.abspath(qtHelpOutputDir) qtHelpGenerator = QtHelpGenerator(outputDir, - qtHelpOutputDir, qtHelpNamespace, qtHelpFolder, - qtHelpFilterName, qtHelpFilterAttribs, - qtHelpTitle, qtHelpCreateCollection) + qtHelpOutputDir, qtHelpNamespace, + qtHelpFolder, qtHelpFilterName, + qtHelpFilterAttribs, qtHelpTitle, + qtHelpCreateCollection) for arg in args: if os.path.isdir(arg): - if os.path.exists(os.path.join(arg, Utilities.joinext("__init__", ".py"))): + if os.path.exists(os.path.join( + arg, Utilities.joinext("__init__", ".py"))): basename = os.path.dirname(arg) if arg == '.': sys.stderr.write("The directory '.' is a package.\n") - sys.stderr.write("Please repeat the call giving its real name.\n") + sys.stderr.write( + "Please repeat the call giving its real name.\n") sys.stderr.write("Ignoring the directory.\n") continue else: @@ -341,9 +347,10 @@ if os.path.isdir(filename): files = [] for ext in supportedExtensions: - files.extend(glob.glob(os.path.join(filename, - Utilities.joinext("*", ext)))) - initFile = os.path.join(filename, Utilities.joinext("__init__", ext)) + files.extend(glob.glob(os.path.join( + filename, Utilities.joinext("*", ext)))) + initFile = os.path.join( + filename, Utilities.joinext("__init__", ext)) if initFile in files: inpackage = True files.remove(initFile) @@ -364,8 +371,9 @@ continue try: - module = Utilities.ModuleParser.readModule(file, basename=basename, - inpackage=inpackage, extensions=supportedExtensions) + module = Utilities.ModuleParser.readModule( + file, basename=basename, + inpackage=inpackage, extensions=supportedExtensions) moduleDocument = ModuleDocument(module, colors, stylesheet) doc = moduleDocument.genDocument() except IOError as v: @@ -377,8 +385,8 @@ input = input + 1 - f = Utilities.joinext(os.path.join(outputDir, moduleDocument.name()), - ".html") + f = Utilities.joinext(os.path.join( + outputDir, moduleDocument.name()), ".html") # remember for index file generation indexGenerator.remember(file, moduleDocument, basename)