Browse Source

The Fine Art of Icon Picking

master
NCLanceman 5 months ago
parent
commit
ba1be85bbd
  1. 16
      iconSelector.py

16
iconSelector.py

@ -10,10 +10,24 @@ def parseDescription(desc):
# "weather word" in a NWS description. # "weather word" in a NWS description.
parsed = desc.split(" ") parsed = desc.split(" ")
for i in parsed:
if i in adjectives:
continue
elif i in clearWords:
return "clear"
elif i in rainWords:
return "rain"
elif i in fogWords:
return "fog"
elif i in windWords:
return "wind"
else:
return "clear"
return "" return ""
def imageSelector(desc): def imageSelector(desc, timeOfDay):
match desc: match desc:
case "Clear": case "Clear":
return "./smallIcons/clear-day-small.png" return "./smallIcons/clear-day-small.png"

Loading…
Cancel
Save