diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-10 16:44:55 -0400 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-10 16:44:55 -0400 |
| commit | b4dffa756e1a5d78bc969f516be97e37a9c43c19 (patch) | |
| tree | eb468c45c424d487db11c446e818eaf3ba02d603 /client | |
| parent | ee143e9e78be4f0b709128d5fddc5f2604e1de38 (diff) | |
| download | jasper-client-b4dffa756e1a5d78bc969f516be97e37a9c43c19.tar.gz jasper-client-b4dffa756e1a5d78bc969f516be97e37a9c43c19.zip | |
Semantic version update + reflect change in Weather module, better output formatting in populate
Diffstat (limited to 'client')
| -rw-r--r-- | client/modules/Weather.py | 2 | ||||
| -rw-r--r-- | client/populate.py | 12 | ||||
| -rw-r--r-- | client/requirements.txt | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/client/modules/Weather.py b/client/modules/Weather.py index 82b9fb7..ad1ac29 100644 --- a/client/modules/Weather.py +++ b/client/modules/Weather.py @@ -56,7 +56,7 @@ def handle(text, mic, profile): tz = getTimezone(profile) service = DateService(tz=tz) - date = service.extractDates(text) + date = service.extractDay(text) if not date: date = datetime.datetime.now(tz=tz) weekday = service.__daysOfWeek__[date.weekday()] diff --git a/client/populate.py b/client/populate.py index 0887648..8ef15a9 100644 --- a/client/populate.py +++ b/client/populate.py @@ -29,14 +29,14 @@ def run(): # phone number clean_number = lambda s: re.sub(r'[^0-9]', '', s) phone_number = clean_number(raw_input( - "Phone number. No country code. Any dashes or spaces will be removed for you: ")) + "\nPhone number (no country code). Any dashes or spaces will be removed for you: ")) if phone_number: profile['phone_number'] = phone_number # carrier - print("Phone carrier (for sending text notifications).") + print("\nPhone carrier (for sending text notifications).") print( - "Enter one of the following: 'AT&T', 'Verizon', 'T-Mobile' OR go to http://www.emailtextmessages.com and enter the email suffix for your carrier (e.g., for Virgin Mobile, enter 'vmobl.com').") + "If you have a US phone number, you can enter one of the following: 'AT&T', 'Verizon', 'T-Mobile' (without the quotes). If your carrier isn't listed or you have an international number, go to http://www.emailtextmessages.com and enter the email suffix for your carrier (e.g., for Virgin Mobile, enter 'vmobl.com'; for T-Mobile Germany, enter 't-d1-sms.de').") carrier = raw_input('Carrier: ') if carrier: if carrier == 'AT&T': @@ -59,7 +59,7 @@ def run(): return True print( - "Location should be a 5-digit US zipcode (e.g., 08544). If you are outside the US, insert the name of your nearest big town/city. For weather requests.") + "\nLocation should be a 5-digit US zipcode (e.g., 08544). If you are outside the US, insert the name of your nearest big town/city. For weather requests.") location = raw_input("Location: ") while location and (verifyLocation(location)==False): print("Weather not found. Please try another location.") @@ -69,7 +69,7 @@ def run(): # timezone print( - "Please enter a timezone from the list located in the TZ* column at http://en.wikipedia.org/wiki/List_of_tz_database_time_zones, or none at all.") + "\nPlease enter a timezone from the list located in the TZ* column at http://en.wikipedia.org/wiki/List_of_tz_database_time_zones, or none at all.") tz = raw_input("Timezone: ") while tz: try: @@ -81,7 +81,7 @@ def run(): tz = raw_input("Timezone: ") response = raw_input( - "Would you prefer to have notifications sent by email (E) or text message (T)? ") + "\nWould you prefer to have notifications sent by email (E) or text message (T)? ") while not response or (response != 'E' and response != 'T'): response = raw_input("Please choose email (E) or text message (T): ") profile['prefers_email'] = (response == 'E') diff --git a/client/requirements.txt b/client/requirements.txt index e86e574..729cfbb 100644 --- a/client/requirements.txt +++ b/client/requirements.txt @@ -11,7 +11,7 @@ python-dateutil==2.1 python-mpd==0.3.0 pytz==2013b quantities==0.10.1 -semantic==1.0.1 +semantic==1.0.3 six==1.6.1 ws4py==0.3.2 requests==2.1.0 |
