I have since found
notify-send
(mentioned here) and have found a set of weather icons that I like. And I'm working on getting the notifications look good.My problem is that I'm not seeing a one-to-one mapping between the condition strings I'm getting from Google and the file names I'm getting from the icon sets. Nor are the image names listed in the XML.
So, I created a simple mapping of Condition strings to icon names.
This is a list of weather conditions that were observable in the American Midwest in summer and early fall, 2009. This is not the whole list of weather conditions.
sub config_icons {
my $path = '/home/jacoby/Pictures/weather_icons/' ;
my %config ;
$config{ 'Clear' } = $path . 'sunny.png' ;
$config{ 'Partly Cloudy' } = $path . 'cloudy1.png' ;
$config{ 'Mostly Cloudy' } = $path . 'cloudy3.png' ;
$config{ 'Cloudy' } = $path . 'cloudy5.png' ;
$config{ 'Overcast' } = $path . 'overcast.png' ;
$config{ 'Haze' } = $path . 'fog.png' ;
$config{ 'Fog' } = $path . 'fog.png' ;
$config{ 'ELSE' } = $path . 'dunno.png' ;
return \%config ;
}
What I am looking for today are the other ones, so I can finish this code and maybe send it out to you. Any help?
Rain (Light, Medium, Heavy, Acid), Snow (L/M/H), Wind, Frost, Hail, Sleet, Graupel, Freezing Rain, Storm (Thunder-, Ice-, Snow-, Dust-, Sand-, Tropical-), Tornado, Dust Devils, Hurricane, Virga, Ice Fog, Flood, Drought, Aurora, Volcanic Ash, Brimstone, Plague of Locusts, Total Protonic Reversal.
ReplyDeleteOkay, that's probably not exactly what the GWeather API says.
ReplyDelete