1 changed files with 25 additions and 0 deletions
@ -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 "" |
||||
Loading…
Reference in new issue