summaryrefslogtreecommitdiffstats
path: root/kachelmann/conditions.pl
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-08-06 01:56:55 +0200
committermakefu <github@syntax-fehler.de>2011-08-06 01:56:55 +0200
commit494b2e6d6d93bd6febbab2fa086fc43310228512 (patch)
tree3a0d0028daf2cefa70c49bae463a3923cb18f4c9 /kachelmann/conditions.pl
parent596c29972408c83a3e83bb3eb369734bd87d4f7b (diff)
parentd865d9db85cc283ae3e7be20dbe4441a4e69f7b3 (diff)
emergency merge
Diffstat (limited to 'kachelmann/conditions.pl')
-rwxr-xr-xkachelmann/conditions.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/kachelmann/conditions.pl b/kachelmann/conditions.pl
new file mode 100755
index 00000000..6d8b5541
--- /dev/null
+++ b/kachelmann/conditions.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+use XML::Simple;
+system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" > /tmp/kachelmann/weather.xml");
+my $xml = new XML::Simple;
+my $data = $xml->XMLin("/tmp/kachelmann/weather.xml");
+my $sentence = "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n";
+system("espeak \"$sentence\"");