|
|
|
@ -56,13 +56,14 @@ def tooltipPrinter(r_dict): |
|
|
|
info = r_dict['properties'] |
|
|
|
# Print station name, temp, humidity, wind speed, wind direction |
|
|
|
stationName = f"Station Name: {info['stationName']}" |
|
|
|
condition = f"Current Condition: {info['textDescription']}" |
|
|
|
temp = f"Temp: {rounding(convertToF(info['temperature']['value']))} F" |
|
|
|
humidity = f"Humidity: {rounding(info['relativeHumidity']['value'])}%" |
|
|
|
windSpeed = rounding(convertToMPH(info['windSpeed']['value'])) |
|
|
|
windDirection = info['windDirection']['value'] |
|
|
|
windData = f"Wind: {windSpeed} MPH, {convertCompass(windDirection)}, {windDirection} degrees" |
|
|
|
precipitation = f"Precipitation (3 Hrs.): {info['precipitationLast3Hours']['value']}" |
|
|
|
result = f"<tool>{stationName} \n{temp} \n{windData} \n{humidity} \n{precipitation}</tool>" |
|
|
|
result = f"<tool>{stationName}\n{condition} \n{temp} \n{windData} \n{humidity} \n{precipitation}</tool>" |
|
|
|
|
|
|
|
return result |
|
|
|
|
|
|
|
@ -92,5 +93,5 @@ else: |
|
|
|
weatherIconImage = f"/home/nclanceman/tools/weather{iconSelect.imageSelector(weatherIcon, timeOfDay)}" |
|
|
|
# print(f"<txt> \u2601 {condition}, {roundedTemp} F</txt>") |
|
|
|
print( |
|
|
|
f"<img>{weatherIconImage}</img><txt> {condition}, {roundedTemp}F</txt>") |
|
|
|
f"<img>{weatherIconImage}</img><txt> {roundedTemp}F</txt>") |
|
|
|
print(tooltipPrinter(request_json)) |
|
|
|
|