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