summaryrefslogtreecommitdiff
path: root/client/modules/HN.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/modules/HN.py')
-rw-r--r--client/modules/HN.py28
1 files changed, 18 insertions, 10 deletions
diff --git a/client/modules/HN.py b/client/modules/HN.py
index ec7ecef..d205829 100644
--- a/client/modules/HN.py
+++ b/client/modules/HN.py
@@ -51,7 +51,8 @@ def handle(text, mic, profile):
Arguments:
text -- user-input, typically transcribed speech
mic -- used to interact with the user (for both input and output)
- profile -- contains information related to the user (e.g., phone number)
+ profile -- contains information related to the user (e.g., phone
+ number)
"""
mic.say("Pulling up some stories.")
stories = getTopStories(maxResults=3)
@@ -93,17 +94,24 @@ def handle(text, mic, profile):
if profile['prefers_email']:
body += article_link
else:
- if not app_utils.emailUser(profile, SUBJECT="", BODY=article_link):
- mic.say(
- "I'm having trouble sending you these articles. Please make sure that your phone number and carrier are correct on the dashboard.")
+ if not app_utils.emailUser(profile, SUBJECT="",
+ BODY=article_link):
+ mic.say("I'm having trouble sending you these " +
+ "articles. Please make sure that your " +
+ "phone number and carrier are correct " +
+ "on the dashboard.")
return
# if prefers email, we send once, at the end
if profile['prefers_email']:
body += "</ul>"
- if not app_utils.emailUser(profile, SUBJECT="From the Front Page of Hacker News", BODY=body):
- mic.say(
- "I'm having trouble sending you these articles. Please make sure that your phone number and carrier are correct on the dashboard.")
+ if not app_utils.emailUser(profile,
+ SUBJECT="From the Front Page of " +
+ "Hacker News",
+ BODY=body):
+ mic.say("I'm having trouble sending you these articles. " +
+ "Please make sure that your phone number and " +
+ "carrier are correct on the dashboard.")
return
mic.say("All done.")
@@ -113,12 +121,12 @@ def handle(text, mic, profile):
if not profile['prefers_email'] and profile['phone_number']:
mic.say("Here are some front-page articles. " +
- all_titles + ". Would you like me to send you these? If so, which?")
+ all_titles + ". Would you like me to send you these? " +
+ "If so, which?")
handleResponse(mic.activeListen())
else:
- mic.say(
- "Here are some front-page articles. " + all_titles)
+ mic.say("Here are some front-page articles. " + all_titles)
def isValid(text):