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