[gozerbot] push by bthate - remove time from weather report on 2012-04-06 09:40 GMT

0 views
Skip to first unread message

goze...@googlecode.com

unread,
Apr 6, 2012, 5:41:29 AM4/6/12
to gozerbo...@googlegroups.com
Revision: 525d8d30bc5d
Author: Bart Thate <bth...@gmail.com>
Date: Fri Apr 6 02:39:59 2012
Log: remove time from weather report
http://code.google.com/p/gozerbot/source/detail?r=525d8d30bc5d

Modified:
/gplugs/weather.py

=======================================
--- /gplugs/weather.py Sun Jan 22 20:57:24 2012
+++ /gplugs/weather.py Fri Apr 6 02:39:59 2012
@@ -77,8 +77,6 @@
if info:
city =
info.getElementsByTagName('city')[0].attributes["data"].value
zip =
info.getElementsByTagName('postal_code')[0].attributes["data"].value
- time =
info.getElementsByTagName('current_date_time')[0].attributes["data"].value
-
weather =
gweather.getElementsByTagName('current_conditions')[0]
condition =
weather.getElementsByTagName('condition')[0].attributes["data"].value
temp_f =
weather.getElementsByTagName('temp_f')[0].attributes["data"].value
@@ -94,7 +92,7 @@
if (not condition == ""):
condition = " Oh, and it's " + condition + "."

- resultstr = "As of %s, %s (%s) has a temperature
of %sC/%sF with %s. %s (%s km/h).%s" % (time, city, zip, temp_c, temp_f,
humidity, wind, wind_km, condition)
+ resultstr = "%s (%s) has a temperature of %sC/%sF
with %s. %s (%s km/h).%s" % (city, zip, temp_c, temp_f, humidity, wind,
wind_km, condition)
elif ievent.command == "forecast":
forecasts =
gweather.getElementsByTagName('forecast_conditions')
for forecast in forecasts:

Reply all
Reply to author
Forward
0 new messages