diff options
| author | 2019-06-24 07:12:58 +0100 | |
|---|---|---|
| committer | 2019-06-24 07:12:58 +0100 | |
| commit | 0c9dfd5bdb2d31373e576051d7a9528313002241 (patch) | |
| tree | a51764784e6fb47f5ad003f0195cc20391b6e9f0 /modules/weather.py | |
| parent | Get RSS feed and mark all IDs as "seen" when first adding the URL (diff) | |
| signature | ||
Also show windspeed in MPh
Diffstat (limited to 'modules/weather.py')
| -rw-r--r-- | modules/weather.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/weather.py b/modules/weather.py index 2b45a98d..0158e94f 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -63,12 +63,14 @@ class Module(ModuleManager.BaseModule): fahrenheit = "%dF" % ((page.data["main"]["temp"]*(9/5))+32) description = page.data["weather"][0]["description"].title() humidity = "%s%%" % page.data["main"]["humidity"] - wind_speed = "%sKM/h" % page.data["wind"]["speed"] + wind_speed_k = "%sKMh" % page.data["wind"]["speed"] + wind_speed_m = "%sMPh" % round( + 0.6214*page.data["wind"]["speed"], 1) event["stdout"].write( - "(%s) %s/%s | %s | Humidity: %s | Wind: %s" % ( + "(%s) %s/%s | %s | Humidity: %s | Wind: %s/%s" % ( location_str, celsius, fahrenheit, description, humidity, - wind_speed)) + wind_speed_k, wind_speed_m)) else: event["stderr"].write("No weather information for this location") else: |
