Add audio prompt for times up
This commit is contained in:
parent
161be7de88
commit
14e136f80c
3 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,7 @@ import time
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pytz import timezone
|
from pytz import timezone
|
||||||
|
from playsound import playsound
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
import zenipy
|
import zenipy
|
||||||
|
@ -87,6 +88,7 @@ def main():
|
||||||
to_go = end-datetime.now(pytz.utc)
|
to_go = end-datetime.now(pytz.utc)
|
||||||
print('\r', str_minutes(to_go), sep='', end='')
|
print('\r', str_minutes(to_go), sep='', end='')
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
playsound('res/timesup.aac')
|
||||||
whatdid = pomodoro_prompt_report(whatnext)
|
whatdid = pomodoro_prompt_report(whatnext)
|
||||||
record_task(whatdid, start)
|
record_task(whatdid, start)
|
||||||
log_step('Completed pomodoro: ' + whatdid, start, True)
|
log_step('Completed pomodoro: ' + whatdid, start, True)
|
||||||
|
@ -100,6 +102,7 @@ def main():
|
||||||
to_go = end-datetime.now(pytz.utc)
|
to_go = end-datetime.now(pytz.utc)
|
||||||
print('\r', str_minutes(to_go), sep='', end='')
|
print('\r', str_minutes(to_go), sep='', end='')
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
playsound('res/timesup.aac')
|
||||||
continue
|
continue
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
if start is None:
|
if start is None:
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
pytz
|
pytz
|
||||||
tzlocal
|
tzlocal
|
||||||
zenipy
|
zenipy
|
||||||
|
playsound
|
||||||
|
|
BIN
res/timesup.aac
Normal file
BIN
res/timesup.aac
Normal file
Binary file not shown.
Loading…
Reference in a new issue