50 print() |
50 print() |
51 print(" -c filename or --style-sheet=filename") |
51 print(" -c filename or --style-sheet=filename") |
52 print(" Specify a CSS style sheet file to be used.") |
52 print(" Specify a CSS style sheet file to be used.") |
53 print(" -e or --noempty") |
53 print(" -e or --noempty") |
54 print(" Don't include empty modules.") |
54 print(" Don't include empty modules.") |
|
55 print(" --eol=eol-type") |
|
56 print(" Use the given eol type to terminate lines.") |
|
57 print(" Valid values are 'cr', 'lf' and 'crlf'.") |
|
58 print(" --exclude-file=pattern") |
|
59 print(" Specify a filename pattern of files to be excluded.") |
|
60 print(" This option may be repeated multiple times.") |
55 print(" -h or --help") |
61 print(" -h or --help") |
56 print(" Show this help and exit.") |
62 print(" Show this help and exit.") |
57 print(" -i or --noindex") |
63 print(" -i or --noindex") |
58 print(" Don't generate index files.") |
64 print(" Don't generate index files.") |
59 print(" -o directory or --outdir=directory") |
65 print(" -o directory or --outdir=directory") |
65 print(" This option may be given multiple times.") |
71 print(" This option may be given multiple times.") |
66 print(" -V or --version") |
72 print(" -V or --version") |
67 print(" Show version information and exit.") |
73 print(" Show version information and exit.") |
68 print(" -x directory or --exclude=directory") |
74 print(" -x directory or --exclude=directory") |
69 print(" Specify a directory basename to be excluded.") |
75 print(" Specify a directory basename to be excluded.") |
70 print(" This option may be repeated multiple times.") |
|
71 print(" --exclude-file=pattern") |
|
72 print(" Specify a filename pattern of files to be excluded.") |
|
73 print(" This option may be repeated multiple times.") |
76 print(" This option may be repeated multiple times.") |
74 print() |
77 print() |
75 print(" --body-color=color") |
78 print(" --body-color=color") |
76 print(" Specify the text color.") |
79 print(" Specify the text color.") |
77 print(" --body-background-color=color") |
80 print(" --body-background-color=color") |
134 |
137 |
135 try: |
138 try: |
136 opts, args = getopt.getopt(sys.argv[1:], "c:ehio:Rrt:Vx:", |
139 opts, args = getopt.getopt(sys.argv[1:], "c:ehio:Rrt:Vx:", |
137 ["exclude=", "extension=", "help", "noindex", "noempty", "outdir=", |
140 ["exclude=", "extension=", "help", "noindex", "noempty", "outdir=", |
138 "recursive", "style-sheet=", "version", |
141 "recursive", "style-sheet=", "version", |
139 "exclude-file=", |
142 "exclude-file=", "eol=", |
140 "body-color=", "body-background-color=", |
143 "body-color=", "body-background-color=", |
141 "l1header-color=", "l1header-background-color=", |
144 "l1header-color=", "l1header-background-color=", |
142 "l2header-color=", "l2header-background-color=", |
145 "l2header-color=", "l2header-background-color=", |
143 "cfheader-color=", "cfheader-background-color=", |
146 "cfheader-color=", "cfheader-background-color=", |
144 "link-color=", |
147 "link-color=", |
189 stylesheetFile = v |
194 stylesheetFile = v |
190 elif k in ["-t", "--extension"]: |
195 elif k in ["-t", "--extension"]: |
191 if not v.startswith("."): |
196 if not v.startswith("."): |
192 v = ".%s" % v |
197 v = ".%s" % v |
193 supportedExtensions.append(v) |
198 supportedExtensions.append(v) |
|
199 elif k == "--eol": |
|
200 if v.lower() == "cr": |
|
201 newline = '\r' |
|
202 elif v.lower() == "lf": |
|
203 newline = '\n' |
|
204 elif v.lower() == "crlf": |
|
205 newline = '\r\n' |
194 |
206 |
195 elif k == "--body-color": |
207 elif k == "--body-color": |
196 colors['BodyColor'] = v |
208 colors['BodyColor'] = v |
197 elif k == "--body-background-color": |
209 elif k == "--body-background-color": |
198 colors['BodyBgColor'] = v |
210 colors['BodyBgColor'] = v |