diff options
author | makefu <github@syntax-fehler.de> | 2011-08-06 01:56:55 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-08-06 01:56:55 +0200 |
commit | 494b2e6d6d93bd6febbab2fa086fc43310228512 (patch) | |
tree | 3a0d0028daf2cefa70c49bae463a3923cb18f4c9 /kachelmann/conditions.pl | |
parent | 596c29972408c83a3e83bb3eb369734bd87d4f7b (diff) | |
parent | d865d9db85cc283ae3e7be20dbe4441a4e69f7b3 (diff) |
emergency merge
Diffstat (limited to 'kachelmann/conditions.pl')
-rwxr-xr-x | kachelmann/conditions.pl | 7 |
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\""); |