Should be working!
This commit is contained in:
parent
3d097e6084
commit
3e8c348fe1
1 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue