From dbefb844577d85a48675e598ef04c4590661952f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 00:25:26 +0200 Subject: Added Kachelmann for weathermonitoring --- kachelmann/conditions.pl | 7 +++++++ kachelmann/weather.xml | 1 + 2 files changed, 8 insertions(+) create mode 100755 kachelmann/conditions.pl create mode 100644 kachelmann/weather.xml (limited to 'kachelmann') diff --git a/kachelmann/conditions.pl b/kachelmann/conditions.pl new file mode 100755 index 00000000..61c43330 --- /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\" > weather.xml"); +my $xml = new XML::Simple; +my $data = $xml->XMLin("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\""); diff --git a/kachelmann/weather.xml b/kachelmann/weather.xml new file mode 100644 index 00000000..8a785308 --- /dev/null +++ b/kachelmann/weather.xml @@ -0,0 +1 @@ + -- cgit v1.2.3