ratox-nuggets

useful ratox related scripts
git clone git://git.2f30.org/ratox-nuggets
Log | Files | Refs | LICENSE

commit 2054111778daca84ac330179d57ddd22a9c67eba
parent 8c7bfc6db86e4c43ad75fab175fda501b5455c04
Author: sin <sin@2f30.org>
Date:   Tue,  7 Oct 2014 17:12:22 +0100

Add weather oracle script

Diffstat:
Aweather | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/weather b/weather @@ -0,0 +1,10 @@ +#!/bin/sh +# +# Simple weather oracle script by myroslav + +tail -n0 -f text_out | while read line; do + address=${line:17:${#line}} # strip off date time + curl -s --get --data-urlencode "query=$address" \ + http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml | \ + perl -ne '/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"' +done > text_in