summaryrefslogtreecommitdiffstats
path: root/kachelmann/changes
diff options
context:
space:
mode:
authortv <tv@xso>2011-08-22 12:48:27 +0200
committertv <tv@xso>2011-08-22 12:48:27 +0200
commit624a21ce26f49950594f4c072d81cb73e29a18fa (patch)
tree61e2ac2d7069e0cffdda8c7c038aa2e1288f9a8e /kachelmann/changes
parent45ceee319c70522d821f65505735bc514d123df5 (diff)
parent9fdb1fc7da782eba9a61da55349cd814f8fb13da (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'kachelmann/changes')
-rwxr-xr-x[-rw-r--r--]kachelmann/changes8
1 files changed, 4 insertions, 4 deletions
diff --git a/kachelmann/changes b/kachelmann/changes
index 1875dabd..22116967 100644..100755
--- 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};
}