Commit d63064ef authored by Thomas Lotze's avatar Thomas Lotze
Browse files

add filter for month to report

parent 2f79c5f6
......@@ -14,8 +14,12 @@ import click
help='Access token',
prompt='Access token',
def cli(url, token):
entries = fetch(url, token)
help='Filter for month (yyyy-mm)',
def cli(url, token, month):
entries = fetch(url, token, month)
......@@ -23,7 +23,7 @@ def parse_time(time_str):
return float(value_str) * unit
def fetch(url, token):
def fetch(url, token, month):
"""Yield all relevant time tracking entries, in no particular order.
......@@ -59,6 +59,9 @@ def fetch(url, token):
if _ != sep:
if month and not date.startswith(month):
seconds = parse_action(action)
entries[['username'], date] += seconds
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment