Originally Posted by
deco147
You can get the icons i used here (found them somewhere on the net i think they are the ones included with rainmeter)
http://db.tt/NtCryJOM
The original source of those icons is here.
They are the VClouds Weather Icons by VClouds, made for his Rainmeter weather skin.
I wrote this to use them in my weather script using the icon names returned by 'icon' instead of the condition/forecast text for now since only the current conditions seem to use the full list of possible conditions.
PHP Code:
rainmeter_imageSelectIcon_Day={
"chanceflurries":"18", # Snow Flurries ###
"chancerain":"10", # Light Rain ###
"chancesleet":"6", # Sleet ###
"chancesnow":"14", # Snow ###
"chancetstorms":"17", # Thunderstorms ###
"clear":"32", # Clear - day ####
"cloudy":"26", # Cloudy ###
"flurries":"18", # Snow Flurries ###
"fog":"20", # Fog ###
"hazy":"21", # Haze ###
"mostlycloudy":"28", # Mostly Cloudy - day ###
"mostlysunny":"34", # Partly Cloudy - day ###
"partlycloudy":"30", # Partly Cloudy - day ###
"partlysunny":"28", # Mostly Cloudy - day ###
"sleet":"6", # Sleet ###
"rain":"39", # Rain ###
"snow":"41", # Snow ###
"sunny":"32", # Hot ###
"tstorms":"37", # Thunderstorms ###
"unknown":"44" # N/A ###
}
rainmeter_imageSelectIcon_Night={
"chanceflurries":"18", # Snow Flurries ###
"chancerain":"10", # Light Rain ###
"chancesleet":"6", # Sleet ###
"chancesnow":"14", # Snow ###
"chancetstorms":"17", # Thunderstorms ###
"clear":"31", # Clear - day ####
"cloudy":"26", # Cloudy ###
"flurries":"18", # Snow Flurries ###
"fog":"20", # Fog ###
"hazy":"21", # Haze ###
"mostlycloudy":"27", # Mostly Cloudy - day ###
"mostlysunny":"33", # Partly Cloudy - day ###
"partlycloudy":"29", # Partly Cloudy - day ###
"partlysunny":"27", # Mostly Cloudy - day ###
"sleet":"6", # Sleet ###
"rain":"45", # Rain ###
"snow":"46", # Snow ###
"sunny":"31", # Hot ###
"tstorms":"47", # Thunderstorms ###
"unknown":"44" # N/A ###
}
def selectForecastIcon_Rainmeter(iconString,isNight):
if isNight == True:
imageNumber = rainmeter_imageSelectIcon_Night[iconString]
else:
imageNumber = rainmeter_imageSelectIcon_Day[iconString]
#endif
return (imageNumber)
#enddef
Since I really like these icons I made the function below to work from the condition text which allows for a little more variety.
PHP Code:
def selectForecastIconCurrent_Rainmeter(iconString,isNight): # not finished yet
if iconString.find("Drizzle") != (-1):
imageNumber = "11"
elif iconString.find("Rain") != (-1):
if isNight == True:
imageNumber = "45"
else:
imageNumber = "39"
#endif
elif iconString.find("Snow") != (-1):
if isNight == True:
imageNumber = "46"
else:
imageNumber = "41"
#endif
elif iconString.find("Snow Grains") != (-1):
imageNumber = "18"
elif iconString.find("Ice Crystals") != (-1):
imageNumber = "18"
elif iconString.find("Ice Pellets") != (-1):
imageNumber = "6"
elif iconString.find("Hail") != (-1):
imageNumber = "6"
elif iconString.find("Mist") != (-1):
imageNumber = "20"
elif iconString.find("Fog") != (-1):
imageNumber = "20"
elif iconString.find("Smoke") != (-1):
imageNumber = "22"
elif iconString.find("Volcanic Ash") != (-1):
imageNumber = "22"
elif iconString.find("Widespread Dust") != (-1):
imageNumber = "19"
elif iconString.find("Sand") != (-1):
imageNumber = "21"
elif iconString.find("Haze") != (-1):
imageNumber = "19"
elif iconString.find("Spray") != (-1):
imageNumber = "9"
elif iconString.find("Dust Whirls") != (-1):
imageNumber = "19"
elif iconString.find("Sandstorm") != (-1):
imageNumber = "21"
elif iconString.find("Low Drifting Snow") != (-1):
imageNumber = "15"
elif iconString.find("Low Drifting Widespread Dust") != (-1):
imageNumber = "19"
elif iconString.find("Low Drifting Sand") != (-1):
imageNumber = "21"
elif iconString.find("Blowing Snow") != (-1):
imageNumber = "15"
elif iconString.find("Blowing Widespread Dust") != (-1):
imageNumber = "19"
elif iconString.find("Blowing Sand") != (-1):
imageNumber = "21"
elif iconString.find("Rain Mist") != (-1):
imageNumber = "9"
elif iconString.find("Rain Showers") != (-1):
if isNight == True:
imageNumber = "45"
else:
imageNumber = "39"
#endif
elif iconString.find("Snow Showers") != (-1):
if isNight == True:
imageNumber = "46"
else:
imageNumber = "41"
#endif
elif iconString.find("Ice Pellet Showers") != (-1):
imageNumber = "6"
elif iconString.find("Small Hail Showers") != (-1):
imageNumber = "6"
elif iconString.find("Hail Showers") != (-1):
imageNumber = "6"
elif iconString.find("Thunderstorms and Rain") != (-1):
if isNight == True:
imageNumber = "47"
else:
imageNumber = "38"
#endif
elif iconString.find("Thunderstorms and Snow") != (-1):
if isNight == True:
imageNumber = "47"
else:
imageNumber = "38"
#endif
elif iconString.find("Thunderstorms and Ice Pellets") != (-1):
if isNight == True:
imageNumber = "47"
else:
imageNumber = "38"
#endif
elif iconString.find("Thunderstorms with Hail") != (-1):
if isNight == True:
imageNumber = "47"
else:
imageNumber = "38"
#endif
elif iconString.find("Thunderstorms with Small Hail") != (-1):
if isNight == True:
imageNumber = "47"
else:
imageNumber = "38"
#endif
elif iconString.find("Thunderstorm") != (-1):
if isNight == True:
imageNumber = "47"
else:
imageNumber = "38"
#endif
elif iconString.find("Freezing Drizzle") != (-1):
imageNumber = "5"
elif iconString.find("Freezing Rain") != (-1):
imageNumber = "5"
elif iconString.find("Freezing Fog") != (-1):
imageNumber = "20"
elif iconString.find("Overcast") != (-1):
imageNumber = "26"
elif iconString.find("Clear") != (-1):
if isNight == True:
imageNumber = "31"
else:
imageNumber = "32"
#endif
elif iconString.find("Partly Cloudy") != (-1):
if isNight == True:
imageNumber = "29"
else:
imageNumber = "30"
#endif
elif iconString.find("Mostly Cloudy") != (-1):
if isNight == True:
imageNumber = "27"
else:
imageNumber = "28"
#endif
elif iconString.find("Scattered Clouds") != (-1):
if isNight == True:
imageNumber = "33"
else:
imageNumber = "34"
#endif
else:
imageNumber = "44"
#endif
return imageNumber
#enddef
Here is what it looks like in action.
Bookmarks