aboutsummaryrefslogtreecommitdiff
path: root/phone.py
diff options
context:
space:
mode:
authorMark Powers <mark@marks.kitchen>2021-07-12 02:00:54 +0100
committerMark Powers <mark@marks.kitchen>2021-07-12 02:00:54 +0100
commit1edb32ec29ca3c1bf4d1a53215ecb2544aa04a6e (patch)
treed770c0f3dd74dab11a5b13c54f37b14c81daa990 /phone.py
parenta981a50b0597498a9fc92249f93f940998455ca3 (diff)
Refactor code to support phone hangup button
Diffstat (limited to 'phone.py')
-rw-r--r--phone.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/phone.py b/phone.py
deleted file mode 100644
index 59b9cfb..0000000
--- a/phone.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import subprocess
-
-class PhoneManager:
- def handle_event(self, event):
- print("handling event", event)
- if event == "fortune":
- res = subprocess.run(["fortune"], stdout=subprocess.PIPE)
- output = res.stdout.decode("utf-8")
- self.speak(output)
- else:
- self.speak(event)
-
-
- def speak(self, text):
- print("speaking:", text)
- subprocess.run(["espeak", text])