mirror of
https://github.com/adulau/gitlog2timesheet.git
synced 2024-12-22 08:36:02 +00:00
--user option added to limit output
This commit is contained in:
parent
deeb3ac156
commit
bb11a2ad1c
2 changed files with 5 additions and 2 deletions
|
@ -21,6 +21,7 @@ Usage
|
|||
repository/project
|
||||
-f FORMAT, --outputformat=FORMAT
|
||||
output format text, csv (default is text)
|
||||
-u USER, --user=USER limit timesheet to the user specified
|
||||
|
||||
|
||||
Sample output
|
||||
|
|
|
@ -61,6 +61,7 @@ parser.add_option("-d", "--debug", action="store_true", dest="debug", help="outp
|
|||
parser.add_option("-w", "--commitfactor", dest="commitfactor", help="work time factor per commit, default is 4 hours",default=4, type="int")
|
||||
parser.add_option("-t", "--total", action="store_true", dest="total", help="total hours worked for each user per repository/project", default=False)
|
||||
parser.add_option("-f", "--outputformat", dest="format", help="output format text, csv (default is text)", default="text", type="string")
|
||||
parser.add_option("-u", "--user", dest="user", help="limit timesheet to the user specified", default=None, type="string")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
@ -78,7 +79,8 @@ for repo in args:
|
|||
(name, email, when, message) = line.split("|")
|
||||
except:
|
||||
continue
|
||||
print logmessage(name=unicode(name), email=email, when=float(when), commitfactor = options.commitfactor, message=unicode(message), repo = os.path.basename(os.path.normpath(repo)), format=options.format)
|
||||
if name == options.user or options.user is None:
|
||||
print logmessage(name=unicode(name), email=email, when=float(when), commitfactor = options.commitfactor, message=unicode(message), repo = os.path.basename(os.path.normpath(repo)), format=options.format)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue