|
|
|
@ -2,6 +2,10 @@ import requests |
|
|
|
import math |
|
|
|
import sys |
|
|
|
import iconSelector as iconSelect |
|
|
|
import os |
|
|
|
|
|
|
|
currentDirectory = os.getcwd() |
|
|
|
CDHardcode = "/home/nclanceman/tools/weather" |
|
|
|
|
|
|
|
try: |
|
|
|
stationName = sys.argv[1] |
|
|
|
@ -96,7 +100,8 @@ else: |
|
|
|
condition = request_json["properties"]["textDescription"] |
|
|
|
timeOfDay = request_json['properties']['icon'].split("/")[5] |
|
|
|
weatherIcon = iconSelect.parseDescription(condition) |
|
|
|
weatherIconImage = f"/home/nclanceman/tools/weather{iconSelect.imageSelector(weatherIcon, timeOfDay)}" |
|
|
|
weatherIconImage = currentDirectory +\ |
|
|
|
iconSelect.imageSelector(weatherIcon, timeOfDay) |
|
|
|
# print(f"<txt> \u2601 {condition}, {roundedTemp} F</txt>") |
|
|
|
print( |
|
|
|
f"<img>{weatherIconImage}</img><txt> {roundedTemp}F</txt>") |
|
|
|
|