View Single Post
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#1
Could someone please help me to get the weatherwidget.sh script to show on qtlockscreen the info about the weather.
I try to use this script
#!/bin/sh
#Arguments:
# 1 = Link to yahoo weather
# 2 = output dir

url=${1-"http://de.weather.yahoo.com/germany/berlin/berlin-638242/?unit=c"}
out=${2-"/tmp"}

# Getting all the necessary info.
wget --user-agent="" -q -t 1 -T 10 -O "$out/ywtemp.htm" "$url"
wget --user-agent="" -q -t 1 -T 10 -O "$out/ywtemp.png" `grep 'forecast-icon.*http.*png' $out/ywtemp.htm | grep -o http*[a-zA-Z0-9\\.\\-\\\\_/\\:]*.png | grep -m 1 http` | echo "Current: `grep 'forecast-icon.*http.*png' $out/ywtemp.htm | grep -o yw-temp..[-0-9]\\* | grep -o temp..[-0-9]* | grep -o [-0-9][-0-9]*`" || { exit 1; }
echo "Conditions: `grep 'forecast-icon.*http.*png' $out/ywtemp.htm | grep -o 'yw-cond..[a-zA-Z ]*' | grep -o \[A-Z].*`" || { exit 1; }
echo `grep 'forecast-icon.*http.*png' $out/ywtemp.htm | grep -o High[:].[-0-9][-0-9]*` || { exit 1; }
echo `grep 'forecast-icon.*http.*png' $out/ywtemp.htm | grep -o Low[:].[-0-9][-0-9]*`|| { exit 1; }
echo "Image: $out/ywtemp.png"
Do i put this script into the folder for the pictures or should it stay in /opt/qtlockscreen ? How do I call the script inside the config for a working theme? As a widget? Do i have to reserve some space for it as well?
Please elaborate as much as possible, because sometimes I act as if I have this awesome N900 for the first day