fixed the wind calculation
This commit is contained in:
6
w.py
6
w.py
@@ -74,7 +74,7 @@ for elem, even in events_update:
|
||||
condi = even.text
|
||||
|
||||
if even.tag == 'F':
|
||||
wind = even.text
|
||||
windu = even.text
|
||||
|
||||
if even.tag == 'ftime':
|
||||
|
||||
@@ -83,7 +83,7 @@ for elem, even in events_update:
|
||||
if time >= justnow and time < mytime:
|
||||
print "Time:", time, "UTC"
|
||||
print "Temperature: ", temp, "°C"
|
||||
print "Wind: ", wind, "m/s", " » " ,int(wind) * 3.6, "km/h"
|
||||
print "Wind: ", windu, "m/s", " » " ,int(windu) * 3.6, "km/h"
|
||||
print "Conditions:", condi, "\n"
|
||||
#break # the fall
|
||||
|
||||
@@ -94,7 +94,7 @@ print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
if os.name is "posix" and platform.system() == "Linux":
|
||||
from gi.repository import Notify
|
||||
|
||||
notification_text = (name + "\n" + temperature + " C\n" + str(int(wind) *3.6) + " km/h\n Conditions: " + str(conditions))
|
||||
notification_text = (name + "\n" + temperature + " C\n" + str(int(wind) * 3.6) + " km/h\n Conditions: " + str(conditions))
|
||||
Notify.init("Weather")
|
||||
|
||||
Hello = Notify.Notification.new("Vedur.is", notification_text)
|
||||
|
Reference in New Issue
Block a user