|
23 | 23 | not everyone may want.
|
24 | 24 | """
|
25 | 25 |
|
26 |
| -# Set debug logging level here |
| 26 | +_version_ = (1, 0, 0) |
| 27 | + |
27 | 28 | import logging
|
28 |
| -logging.basicConfig(filename="flic.log", level=logging.DEBUG) |
| 29 | +logging.basicConfig(filename="flic.log") |
29 | 30 | log = logging.getLogger("flic")
|
30 | 31 |
|
31 | 32 | import sys
|
@@ -187,12 +188,24 @@ def main(argv):
|
187 | 188 | parser = argparse.ArgumentParser(description=\
|
188 | 189 | 'Collate and process license information.')
|
189 | 190 | parser.add_argument('--template', metavar="<template>",
|
190 |
| - help='Render the given template name') |
191 |
| - parser.add_argument('--input', metavar="<input file>", action="append", |
| 191 | + help='render the given template name') |
| 192 | + parser.add_argument('-i', '--input', metavar="<input file>", action="append", |
192 | 193 | help='JSON output of "slic" program')
|
| 194 | + parser.add_argument('-V', '--version', action="store_true", |
| 195 | + help='show version number and exit') |
| 196 | + parser.add_argument('-d', '--debug', action="store_true", |
| 197 | + help='output debugging info to flic.log') |
193 | 198 |
|
194 | 199 | args = parser.parse_args()
|
195 | 200 |
|
| 201 | + if args.version: |
| 202 | + ver = '.'.join([str(part) for part in _version_]) |
| 203 | + print "flic %s" % ver |
| 204 | + return |
| 205 | + |
| 206 | + if args.debug: |
| 207 | + log.setLevel(logging.DEBUG) |
| 208 | + |
196 | 209 | # Load occurrence data file
|
197 | 210 | bytag = SlicResults()
|
198 | 211 | for filename in args.input:
|
|
0 commit comments