From 4dd35fe3fb1b5d0bfd0c29558e7a1911dfc0a314 Mon Sep 17 00:00:00 2001 From: Niles Rogoff Date: Sat, 12 Aug 2017 09:31:20 -0700 Subject: [PATCH] Small updates to today.py --- today.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/today.py b/today.py index 70831b4..a380f50 100644 --- a/today.py +++ b/today.py @@ -94,15 +94,16 @@ def get_time(c): return c[1] ### Actual commands classes = [ - [["C++", today(9, 5)], ["Linear Algebra", today(16, 00)]] # monday is zero - , [["Engineering", today(8, 00)], ["English", today(12, 30)]] - , [["C++", today(9, 5)], ["Linear Algebra", today(16, 00)]] - , [["Engineering", today(8, 00)], ["English", today(12, 30)]] - , [["Linear Algebra", today(16, 00)]] # friday + [["Multivar", today(10, 10)], ["Physics", today(11, 15)], ["Physics again", today(12, 20)]] # monday is zero + , [["2505", today(14, 00)], ["Discrete", today(15, 30)], ["Seminar", today(17, 00)]] + , [["Multivar", today(10, 10)], ["Physics", today(12, 20)], ["Lab", today(14, 30)]] + , [["2505", today(14, 00)], ["Discrete", today(15, 30)]] + , [["Multivar", today(10, 10)], ["Physics", today(12, 20)]] # friday , [] , [] # sunday ] +# TODO Update alarms = [ [today(8, 15), today(15, 30)] # monday , [today(7, 15), today(12, 00)] @@ -180,7 +181,9 @@ messages = [ ### Does the actual printing m = "\n".join([k[1] for k in messages]) -# tts = gtts.gTTS(m) -# tts.save("/tmp/temp.mp3") -# subprocess.call(["mpv", "/tmp/temp.mp3"]) + print(m) +if voice: + tts = gtts.gTTS(m) + tts.save("/tmp/temp.mp3") + subprocess.call(["mpv", "/tmp/temp.mp3"])