summaryrefslogtreecommitdiffstats
path: root/kachelmann
diff options
context:
space:
mode:
authorChinaman <root@chinaman>2011-09-06 19:47:58 +0200
committerChinaman <root@chinaman>2011-09-06 19:47:58 +0200
commit108f3616e3f4958752d881192ef29e5fc4c2b045 (patch)
tree3c67478c852265219b72e6e1b05467d7065b7ba8 /kachelmann
parentb2d65500160bcdf7abb2bf985f7da582b810e25c (diff)
parentc3bc5a6d16868c121aca780f3109155797b51d76 (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'kachelmann')
-rw-r--r--kachelmann/.gitignore2
-rw-r--r--kachelmann/Makefile7
-rwxr-xr-xkachelmann/wetter6
3 files changed, 15 insertions, 0 deletions
diff --git a/kachelmann/.gitignore b/kachelmann/.gitignore
new file mode 100644
index 00000000..050dfb2e
--- /dev/null
+++ b/kachelmann/.gitignore
@@ -0,0 +1,2 @@
+conditions.pl
+.*.swp
diff --git a/kachelmann/Makefile b/kachelmann/Makefile
new file mode 100644
index 00000000..3343d941
--- /dev/null
+++ b/kachelmann/Makefile
@@ -0,0 +1,7 @@
+.PHONY: infect
+install:
+ # punani -Ei w3m php php-xml-simple
+ ln -s $$PWD/conditions ../bin/conditions
+ ln -s $$PWD/wetter ../bin/wetter
+ ln -s ${INSTALL_DIR}conditions ${INSTALL_DIR}kachelmann
+
diff --git a/kachelmann/wetter b/kachelmann/wetter
new file mode 100755
index 00000000..957e13e2
--- /dev/null
+++ b/kachelmann/wetter
@@ -0,0 +1,6 @@
+#!/usr/bin/perl
+use XML::Simple;
+my $result = `w3m -dump "http://www.google.com/ig/api?weather=70327-stuttgart&hl=de"`;
+my $xml = new XML::Simple;
+my $data = $xml->XMLin($result);
+print ("$data->{weather}->{current_conditions}->{condition}->{data} bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Zelsius\n");