Should be working!

This commit is contained in:
benjamin melançon 2020-07-05 16:00:19 -04:00
parent 3d097e6084
commit 3e8c348fe1

View file

@ -12,9 +12,11 @@ LONG_MIN = 15
def pomodoro_prompt_plan(whatdid = ''):
whatnext = zenipy.zenipy.entry(text="What're you gonna do?", placeholder='Same thing i did last time', title='Pomodoro Prompt: Plan')
return whatnext
def pomodoro_prompt_report(whatnext):
whatdid = zenipy.zenipy.entry(text="What'd you do?", placeholder='What i said i would do', title='Pomodoro Prompt: Report')
return whatdid
def record_task(whatdid, start, end=None):
if end is None:
@ -30,10 +32,10 @@ def main():
start = datetime.now(pytz.utc)
end = start + timedelta(minutes=WORK_MIN, seconds=0)
try:
print('Task -', line)
while True:
diff = datetime.now(pytz.utc)-start
print('\r', str(diff).split('.')[0], sep='', end='')
print('Task -', whatnext)
while datetime.now(pytz.utc) <= end:
to_go = end-datetime.now(pytz.utc)
print('\r', str(to_go).split('.')[0], sep='', end='')
time.sleep(1)
whatdid = pomodoro_prompt_report(whatnext)
record_task(whatdid, start)