|
|
@@ -1348,10 +1348,21 @@ plot """
|
|
1348
|
1348
|
</div>
|
|
1349
|
1349
|
""")
|
|
1350
|
1350
|
|
|
|
1351
|
+def usage():
|
|
|
1352
|
+ print """
|
|
|
1353
|
+Usage: gitstats [options] <gitpath..> <outputpath>
|
|
|
1354
|
+
|
|
|
1355
|
+Options:
|
|
|
1356
|
+-c key=value Override configuration value
|
|
|
1357
|
+
|
|
|
1358
|
+Default config values:
|
|
|
1359
|
+%s
|
|
|
1360
|
+""" % conf
|
|
|
1361
|
+
|
|
1351
|
1362
|
|
|
1352
|
1363
|
class GitStats:
|
|
1353
|
1364
|
def run(self, args_orig):
|
|
1354
|
|
- optlist, args = getopt.getopt(args_orig, 'c:')
|
|
|
1365
|
+ optlist, args = getopt.getopt(args_orig, 'hc:', ["help"])
|
|
1355
|
1366
|
for o,v in optlist:
|
|
1356
|
1367
|
if o == '-c':
|
|
1357
|
1368
|
key, value = v.split('=', 1)
|
|
|
@@ -1364,17 +1375,12 @@ class GitStats:
|
|
1364
|
1375
|
conf[key][kk] = vv
|
|
1365
|
1376
|
else:
|
|
1366
|
1377
|
conf[key] = value
|
|
|
1378
|
+ elif o in ('-h', '--help'):
|
|
|
1379
|
+ usage()
|
|
|
1380
|
+ sys.exit()
|
|
1367
|
1381
|
|
|
1368
|
1382
|
if len(args) < 2:
|
|
1369
|
|
- print """
|
|
1370
|
|
-Usage: gitstats [options] <gitpath..> <outputpath>
|
|
1371
|
|
-
|
|
1372
|
|
-Options:
|
|
1373
|
|
--c key=value Override configuration value
|
|
1374
|
|
-
|
|
1375
|
|
-Default config values:
|
|
1376
|
|
-%s
|
|
1377
|
|
-""" % conf
|
|
|
1383
|
+ usage()
|
|
1378
|
1384
|
sys.exit(0)
|
|
1379
|
1385
|
|
|
1380
|
1386
|
outputpath = os.path.abspath(args[-1])
|