check if we're in an active sprint

This commit is contained in:
Tobias Schmidl 2021-04-27 15:42:25 +02:00
parent 79b74c50b8
commit 96edda1f59

View file

@ -33,10 +33,10 @@ RESULTS = sorted(map(
x['tags']
}, TW.summary()),
key=lambda x: x['start'])
IS_ACTIVE = len(list(filter(lambda x: "end" not in x, TW.summary()))) > 0
print("{}\n-----".format(
str(functools.reduce(lambda total, x: total + x['end'] - x['start'], RESULTS, timedelta())).split(sep='.',
maxsplit=1)[0]))
print("" if IS_ACTIVE else "", str(functools.reduce(lambda total, x: total + x['end'] - x['start'], RESULTS, timedelta())).split(sep='.', maxsplit=1)[0], "" if not IS_ACTIVE else "")
print("---")
print(
" | font=monospace | size=8\n".join(
map(