Skip to content

Commit

Permalink
added map link to current weather
Browse files Browse the repository at this point in the history
  • Loading branch information
nod committed Oct 29, 2012
1 parent ac360a2 commit 276dd85
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions plugins/Outside/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,16 @@ def forecast(cls, loc):
def current(cls, loc):
w = Wunder()
data = w.request(features=['conditions'], location=loc)
ret = []
return 'currently in {}: {}, {} F, feels like {}'.format(
data['current_observation']['observation_location']['full'],
lat = data['current_observation']['display_location']['latitude']
lon = data['current_observation']['display_location']['longitude']
map = 'https://maps.google.com/maps?z=10&lci=weather&ll={},{}'.format(
lat[:6],lon[:6])
return 'currently in {}: {}, {} F, feels like {} {}'.format(
data['current_observation']['display_location']['full'],
data['current_observation']['weather'],
data['current_observation']['temp_f'],
data['current_observation']['feelslike_string']
data['current_observation']['feelslike_string'],
map
)


Expand Down Expand Up @@ -138,11 +142,11 @@ def severe(cls, loc):


print "----------- current ------------"
# print Weather.current('78641')
print Weather.current('78641')


# print Weather.severe('78641')
# print Weather.severe('08204')


print Weather.hurricane()
# print Weather.hurricane()

0 comments on commit 276dd85

Please sign in to comment.