diff --git a/pomodoroprompt.py b/pomodoroprompt.py index 4f55855..6ada2e1 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -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)