Add quiet option

This commit is contained in:
Christopher Thompson 2020-10-10 00:20:18 -04:00
parent dd3031fcc3
commit 8b7d80d318

View file

@ -13,7 +13,7 @@ WORK_MIN = 25 # Minutes for a work session
SHORT_MIN = 5 # Minutes for a short break SHORT_MIN = 5 # Minutes for a short break
LONG_MIN = 15 # Minutes for a long break (NOT YET IMPLEMENTED) LONG_MIN = 15 # Minutes for a long break (NOT YET IMPLEMENTED)
INTERRUPTED_MIN = 1 # Minimum minutes to ask to record an interrupted Pomodoro INTERRUPTED_MIN = 1 # Minimum minutes to ask to record an interrupted Pomodoro
QUIET = False
def pomodoro_prompt_plan(whatdid = ''): def pomodoro_prompt_plan(whatdid = ''):
""" Ask about what task will be worked on (showing last thing worked on) """ Ask about what task will be worked on (showing last thing worked on)
@ -107,6 +107,7 @@ def main():
try: try:
print('Working on: ', whatnext) print('Working on: ', whatnext)
countdown_to(end) countdown_to(end)
if not QUIET:
playsound('res/timesup.aac') playsound('res/timesup.aac')
whatdid = pomodoro_prompt_report(whatnext) whatdid = pomodoro_prompt_report(whatnext)
record_task(whatdid, start) record_task(whatdid, start)
@ -118,6 +119,7 @@ def main():
start = None start = None
end = datetime.now(pytz.utc) + timedelta(minutes=SHORT_MIN) end = datetime.now(pytz.utc) + timedelta(minutes=SHORT_MIN)
countdown_to(end) countdown_to(end)
if not QUIET:
playsound('res/timesup.aac') playsound('res/timesup.aac')
continue continue
except KeyboardInterrupt: except KeyboardInterrupt: