From c486d565355dceeaa80175edbc1ad849eeae6161 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 9 Mar 2021 21:29:02 +0000 Subject: [PATCH 1/2] Only echo to screen if screen reader is active --- notifications_client.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index 2073ed9a4..606aabadf 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -218,18 +218,20 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, # append image description if needed if not speakerJson.get('imageDescription'): sayStr = speakerJson['say'] - # echo spoken text to the screen - print(html.unescape(nameStr) + ': ' + - html.unescape(speakerJson['say']) + '\n') + if screenreader: + # echo spoken text to the screen + print(html.unescape(nameStr) + ': ' + + html.unescape(speakerJson['say']) + '\n') else: sayStr = speakerJson['say'] + '. ' + \ speakerJson['imageDescription'] # echo spoken text to the screen imageDescription = \ html.unescape(speakerJson['imageDescription']) - print(html.unescape(nameStr) + ': ' + - html.unescape(speakerJson['say']) + '\n' + - imageDescription) + if screenreader: + print(html.unescape(nameStr) + ': ' + + html.unescape(speakerJson['say']) + + '\n' + imageDescription) # speak the post content if screenreader == 'espeak': From 6aeba81bd24c6e286234d6d835127a32270d7c53 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 9 Mar 2021 21:30:23 +0000 Subject: [PATCH 2/2] Initial message --- notifications_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notifications_client.py b/notifications_client.py index 606aabadf..86bbc7a63 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -113,6 +113,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, return print('Running ' + screenreader + ' for ' + nickname + '@' + domain) + else: + print('Running desktop notifications for ' + nickname + '@' + domain) prevSay = '' prevDM = False