|
|
@ -1,10 +1,6 @@ |
|
|
import requests |
|
|
import requests |
|
|
import math |
|
|
import math |
|
|
import sys |
|
|
import sys |
|
|
from pathlib import PurePath, PurePosixPath |
|
|
|
|
|
|
|
|
|
|
|
currentPath = PurePath('.') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
stationName = sys.argv[1] |
|
|
stationName = sys.argv[1] |
|
|
@ -90,7 +86,7 @@ else: |
|
|
temp = convertToF(request_json["properties"]["temperature"]["value"]) |
|
|
temp = convertToF(request_json["properties"]["temperature"]["value"]) |
|
|
roundedTemp = rounding(temp) |
|
|
roundedTemp = rounding(temp) |
|
|
condition = request_json["properties"]["textDescription"] |
|
|
condition = request_json["properties"]["textDescription"] |
|
|
|
|
|
timeOfDay = request_json['properties']['icon'].split("/")[5] |
|
|
# print(f"<txt> \u2601 {condition}, {roundedTemp} F</txt>") |
|
|
# print(f"<txt> \u2601 {condition}, {roundedTemp} F</txt>") |
|
|
print( |
|
|
print( |
|
|
f"<img>/home/nclanceman/tools/weather/smallIcons/cloudy-small.png</img><txt> {condition}, {roundedTemp}F</txt>") |
|
|
f"<img>/home/nclanceman/tools/weather/smallIcons/cloudy-small.png</img><txt> {condition}, {roundedTemp}F</txt>") |
|
|
|