Browse Source

added hail

master
NCLanceman 5 months ago
parent
commit
0250ef4f55
  1. BIN
      __pycache__/iconSelector.cpython-311.pyc
  2. 6
      iconSelector.py

BIN
__pycache__/iconSelector.cpython-311.pyc

Binary file not shown.

6
iconSelector.py

@ -10,6 +10,7 @@ fogWords = ["fog", "mist", "smoke"]
windWords = ["wind", "windy", "gusts"]
cloudWords = ["cloudy", "overcast"]
stormWords = ["thunderstorms", "thunderstorm"]
hailWords = ["hail"]
def parseDescription(desc):
@ -33,6 +34,8 @@ def parseDescription(desc):
return "cloudy"
elif i in stormWords:
return "thunderstorm"
elif i in hailWords:
return "hail"
else:
return "clear"
@ -67,6 +70,9 @@ def imageSelector(desc, timeOfDay):
case "rain":
result = os.path.join(
currentDirectory, 'smallIcons', 'rain-small.png')
case "hail":
result = os.path.join(
currentDirectory, 'smallIcons', 'hail-small.png')
case _:
result = os.path.join(
currentDirectory, 'smallIcons', 'code-red-small.png')

Loading…
Cancel
Save