From 176407e63801e8681608d0bf0ebfe6bb809c56b9 Mon Sep 17 00:00:00 2001 From: Momo Date: Fri, 19 Aug 2011 18:23:20 +0200 Subject: Workz nau biatches --- kachelmann/changes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 kachelmann/changes (limited to 'kachelmann/changes') diff --git a/kachelmann/changes b/kachelmann/changes old mode 100644 new mode 100755 index 1875dabd..d2f1c740 --- a/kachelmann/changes +++ b/kachelmann/changes @@ -10,15 +10,15 @@ my $condition_store = undef; my $data_old = $condition_store; while (1) { &xml_update(); + $data_old = $data_new; $data_new = $condition_store; - if($data_new == $data_old){ - system("espeak Das Wetter hat sich von $data_old in $data_new verändert"); + if($data_new ne $data_old){ + system("espeak \"Das Wetter hat sich von $data_old in $data_new verändert\n\"); } sleep 300; - $data_new = $data_old; } sub xml_update(){ - $xml_store = system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\""); + $xml_store = `w3m -dump "http://www.google.com/ig/api?weather=70327-stuttgart&hl=de"`; $xml_store = $xml->XMLin($xml_store); $condition_store = $xml_store->{weather}->{current_conditions}->{condition}->{data}; } -- cgit v1.2.3 From 95f12b7f3aeaf4577d8a1415c0dca07a1e62bb13 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Aug 2011 18:20:28 +0200 Subject: minor bug fix --- kachelmann/changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kachelmann/changes') diff --git a/kachelmann/changes b/kachelmann/changes index d2f1c740..22116967 100755 --- a/kachelmann/changes +++ b/kachelmann/changes @@ -13,7 +13,7 @@ while (1) { $data_old = $data_new; $data_new = $condition_store; if($data_new ne $data_old){ - system("espeak \"Das Wetter hat sich von $data_old in $data_new verändert\n\"); + system("espeak \"Das Wetter hat sich von $data_old in $data_new verändert\n\""); } sleep 300; } -- cgit v1.2.3