35 Function to print some usage information. |
35 Function to print some usage information. |
36 |
36 |
37 It prints a reference of all commandline parameters that may |
37 It prints a reference of all commandline parameters that may |
38 be used and ends the application. |
38 be used and ends the application. |
39 """ |
39 """ |
40 print "eric4-doc" |
40 print("eric4-doc") |
41 print |
41 print() |
42 print "Copyright (c) 2003 - 2009 Detlev Offenbach <detlev@die-offenbachs.de>." |
42 print("Copyright (c) 2003 - 2009 Detlev Offenbach <detlev@die-offenbachs.de>.") |
43 print |
43 print() |
44 print "Usage:" |
44 print("Usage:") |
45 print |
45 print() |
46 print " eric4-doc [options] files..." |
46 print(" eric4-doc [options] files...") |
47 print |
47 print() |
48 print "where files can be either python modules, package" |
48 print("where files can be either python modules, package") |
49 print "directories or ordinary directories." |
49 print("directories or ordinary directories.") |
50 print |
50 print() |
51 print "Options:" |
51 print("Options:") |
52 print |
52 print() |
53 print " -c filename or --style-sheet=filename" |
53 print(" -c filename or --style-sheet=filename") |
54 print " Specify a CSS style sheet file to be used." |
54 print(" Specify a CSS style sheet file to be used.") |
55 print " -e or --noempty" |
55 print(" -e or --noempty") |
56 print " Don't include empty modules." |
56 print(" Don't include empty modules.") |
57 print " -h or --help" |
57 print(" -h or --help") |
58 print " Show this help and exit." |
58 print(" Show this help and exit.") |
59 print " -i or --noindex" |
59 print(" -i or --noindex") |
60 print " Don't generate index files." |
60 print(" Don't generate index files.") |
61 print " -o directory or --outdir=directory" |
61 print(" -o directory or --outdir=directory") |
62 print " Generate files in the named directory." |
62 print(" Generate files in the named directory.") |
63 print " -R, -r or --recursive" |
63 print(" -R, -r or --recursive") |
64 print " Perform a recursive search for Python files." |
64 print(" Perform a recursive search for Python files.") |
65 print " -t ext or --extension=ext" |
65 print(" -t ext or --extension=ext") |
66 print " Add the given extension to the list of file extensions." |
66 print(" Add the given extension to the list of file extensions.") |
67 print " This option may be given multiple times." |
67 print(" This option may be given multiple times.") |
68 print " -V or --version" |
68 print(" -V or --version") |
69 print " Show version information and exit." |
69 print(" Show version information and exit.") |
70 print " -x directory or --exclude=directory" |
70 print(" -x directory or --exclude=directory") |
71 print " Specify a directory basename to be excluded." |
71 print(" Specify a directory basename to be excluded.") |
72 print " This option may be repeated multiple times." |
72 print(" This option may be repeated multiple times.") |
73 print " --exclude-file=pattern" |
73 print(" --exclude-file=pattern") |
74 print " Specify a filename pattern of files to be excluded." |
74 print(" Specify a filename pattern of files to be excluded.") |
75 print " This option may be repeated multiple times." |
75 print(" This option may be repeated multiple times.") |
76 print |
76 print() |
77 print " --body-color=color" |
77 print(" --body-color=color") |
78 print " Specify the text color." |
78 print(" Specify the text color.") |
79 print " --body-background-color=color" |
79 print(" --body-background-color=color") |
80 print " Specify the text background color." |
80 print(" Specify the text background color.") |
81 print " --l1header-color=color" |
81 print(" --l1header-color=color") |
82 print " Specify the text color of level 1 headers." |
82 print(" Specify the text color of level 1 headers.") |
83 print " --l1header-background-color=color" |
83 print(" --l1header-background-color=color") |
84 print " Specify the text background color of level 1 headers." |
84 print(" Specify the text background color of level 1 headers.") |
85 print " --l2header-color=color" |
85 print(" --l2header-color=color") |
86 print " Specify the text color of level 2 headers." |
86 print(" Specify the text color of level 2 headers.") |
87 print " --l2header-background-color=color" |
87 print(" --l2header-background-color=color") |
88 print " Specify the text background color of level 2 headers." |
88 print(" Specify the text background color of level 2 headers.") |
89 print " --cfheader-color=color" |
89 print(" --cfheader-color=color") |
90 print " Specify the text color of class and function headers." |
90 print(" Specify the text color of class and function headers.") |
91 print " --cfheader-background-color=color" |
91 print(" --cfheader-background-color=color") |
92 print " Specify the text background color of class and function headers." |
92 print(" Specify the text background color of class and function headers.") |
93 print " --link-color=color" |
93 print(" --link-color=color") |
94 print " Specify the text color of hyperlinks." |
94 print(" Specify the text color of hyperlinks.") |
95 print |
95 print() |
96 print " --create-qhp" |
96 print(" --create-qhp") |
97 print " Enable generation of QtHelp files." |
97 print(" Enable generation of QtHelp files.") |
98 print " --qhp-outdir=directory" |
98 print(" --qhp-outdir=directory") |
99 print " Generate QtHelp files in the named directory." |
99 print(" Generate QtHelp files in the named directory.") |
100 print " --qhp-namespace=namespace" |
100 print(" --qhp-namespace=namespace") |
101 print " Use the given namespace (mandatory)." |
101 print(" Use the given namespace (mandatory).") |
102 print " --qhp-virtualfolder=folder" |
102 print(" --qhp-virtualfolder=folder") |
103 print " Use the given virtual folder (mandatory)." |
103 print(" Use the given virtual folder (mandatory).") |
104 print " The virtual folder must not contain '/'." |
104 print(" The virtual folder must not contain '/'.") |
105 print " --qhp-filtername=name" |
105 print(" --qhp-filtername=name") |
106 print " Use the given name for the custom filter." |
106 print(" Use the given name for the custom filter.") |
107 print " --qhp-filterattribs=attributes" |
107 print(" --qhp-filterattribs=attributes") |
108 print " Add the given attributes to the filter list." |
108 print(" Add the given attributes to the filter list.") |
109 print " Attributes must be separated by ':'." |
109 print(" Attributes must be separated by ':'.") |
110 print " --qhp-title=title" |
110 print(" --qhp-title=title") |
111 print " Use this as the title for the generated help (mandatory)." |
111 print(" Use this as the title for the generated help (mandatory).") |
112 print " --create-qhc" |
112 print(" --create-qhc") |
113 print " Enable generation of QtHelp Collection files." |
113 print(" Enable generation of QtHelp Collection files.") |
114 sys.exit(1) |
114 sys.exit(1) |
115 |
115 |
116 def version(): |
116 def version(): |
117 """ |
117 """ |
118 Function to show the version information. |
118 Function to show the version information. |
119 """ |
119 """ |
120 print \ |
120 print("""eric4-doc %s |
121 """eric4-doc %s |
|
122 |
121 |
123 Eric4 API documentation generator. |
122 Eric4 API documentation generator. |
124 |
123 |
125 Copyright (c) 2003-2009 Detlev Offenbach <detlev@die-offenbachs.de> |
124 Copyright (c) 2003-2009 Detlev Offenbach <detlev@die-offenbachs.de> |
126 This is free software; see the LICENSE.GPL3 for copying conditions. |
125 This is free software; see the LICENSE.GPL3 for copying conditions. |
127 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A |
126 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A |
128 PARTICULAR PURPOSE.""" % Version |
127 PARTICULAR PURPOSE.""" % Version) |
129 sys.exit(1) |
128 sys.exit(1) |
130 |
129 |
131 def main(): |
130 def main(): |
132 """ |
131 """ |
133 Main entry point into the application. |
132 Main entry point into the application. |