summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-27 00:00:35 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-27 00:00:46 +0200
commit7669f50c0650196f855d724849e3678355a3f91d (patch)
tree0cd51dabee4a238946e7d6d76d9520432c60bc18
parent323707f63f416d6143b14640da4c44db71db223a (diff)
Update for changed icon names
-rw-r--r--.gitignore10
-rwxr-xr-xbin/vweather11
l---------share/weather/partlycloudy1
l---------share/weather/scatteredthunderstorms1
4 files changed, 19 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 8f6a118..dd1492a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,10 @@
+/_build
/Build
-/_build/
-/blib/
+/blib
+/cover_db
/lib/Derf/Visual/WeatherIcons.pm
+/MANIFEST
+/MANIFEST.bak
+/MANIFEST.SKIP
+/MANIFEST.SKIP.bak
+/MYMETA.yml
diff --git a/bin/vweather b/bin/vweather
index b04a203..7c19e6d 100755
--- a/bin/vweather
+++ b/bin/vweather
@@ -17,6 +17,13 @@ my %opt;
my $alpha;
my $dump;
my $iconstore = Derf::Visual::WeatherIcons->new();
+my $icon_re = qr{
+ /
+ (?: weather_ )?
+ ([^/]+?)
+ (?: -40 )?
+ \. gif $
+}x;
my $weather = Weather::Google->new(
'Essen, Germany',
@@ -43,7 +50,7 @@ sub show_weather_console {
);
if ($dump) {
- say $day->{'icon'};
+ say ($day->{'icon'} =~ $icon_re);
}
}
}
@@ -73,7 +80,7 @@ sub show_weather_png {
my $wday = substr($day->{'day_of_week'}, 0, 2);
my $low = sprintf('%2d', $day->{'low'});
my $high = sprintf('%2d', $day->{'high'});
- my ($icon) = ($day->{'icon'} =~ m{ / ([^/]+) \. gif $ }x);
+ my ($icon) = ($day->{'icon'} =~ $icon_re);
if (not defined $day) {
last;
diff --git a/share/weather/partlycloudy b/share/weather/partlycloudy
new file mode 120000
index 0000000..d1cf0f7
--- /dev/null
+++ b/share/weather/partlycloudy
@@ -0,0 +1 @@
+cloudy_40.png \ No newline at end of file
diff --git a/share/weather/scatteredthunderstorms b/share/weather/scatteredthunderstorms
new file mode 120000
index 0000000..da4e8e6
--- /dev/null
+++ b/share/weather/scatteredthunderstorms
@@ -0,0 +1 @@
+clouds_rain_40.png \ No newline at end of file