diff options
author | Momo <momorientes@online.de> | 2011-08-05 22:33:13 +0200 |
---|---|---|
committer | Momo <momorientes@online.de> | 2011-08-05 22:33:13 +0200 |
commit | c73c481e69f886f4d1e725ab42573ff8926d386e (patch) | |
tree | f76f2f2a5659b414eda7a59c6318182fa45eb35e | |
parent | 6d401ca9e17d83f13cea3ba35fb8b550c64b3c0c (diff) |
Added Kachelman to return the current weather situation
-rw-r--r-- | kachelmann/conditions.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kachelmann/conditions.pl b/kachelmann/conditions.pl new file mode 100644 index 00000000..feabe6aa --- /dev/null +++ b/kachelmann/conditions.pl @@ -0,0 +1,6 @@ +#!/usr/bin/perl +use XML::Simple; +system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" > weather.xml"); +my $xml = new XML::Simple; +my $data = $xml->XMLin("weather.xml"); +print "Draussen ist $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n"; |