From bcd1bc36db130b69a4c06209b0d212db94f39bc7 Mon Sep 17 00:00:00 2001 From: NCLanceman Date: Mon, 16 Jun 2025 15:27:21 -0500 Subject: [PATCH] Working on Weather Selector --- iconSelector.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 iconSelector.py diff --git a/iconSelector.py b/iconSelector.py new file mode 100644 index 0000000..4b086c2 --- /dev/null +++ b/iconSelector.py @@ -0,0 +1,25 @@ +weatherWords = ["clear", "cloudy", "wind", "thunderstorm", "rain"] + + +def parseDescription(desc): + # Parse a weather description by returning the first + # "weather word" in a NWS description. + parsed = desc.split(" ") + + return "" + + +def imageSelector(desc): + match desc: + case "Clear": + return "./smallIcons/clear-day-small.png" + case "Cloudy": + return "./smallIcons/cloudy-small.png" + case "Wind": + return "./smallIcons/wind-small.png" + case "Thunderstorm": + return "./smallIcons/thunderstorms-day-small.png" + case "Rain": + return "./smallIcons/rain-small.png" + + return ""