summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMomo <momorientes@online.de>2011-08-05 22:33:13 +0200
committerMomo <momorientes@online.de>2011-08-05 22:33:13 +0200
commit542d2cd418f1e0feb62de72f5d34e419e38abc7d (patch)
treec9de800190dd2531b5c6f8c74ed2f9db72c2d225
parentb33b0c3a45fbd160ec855cf6d45dd0281d6226c8 (diff)
Added Kachelman to return the current weather situation
-rw-r--r--kachelmann/conditions.pl6
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";