I want to show the weather for my location, Ensenada, BC, Mexico on conky. I have tried the following script:


METRIC=1 #Should be 0 or 1; 0 for F, 1 for C

if [ -z $1 ]; then
echo "USAGE: weather.sh <locationcode>"
exit 0;

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\? 
metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\ 
<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'

together with this code in .conkyrc:

${voffset 10}$alignr$color Los Angeles, CA: ${execi 300 
/usr/bin/weather.sh 347625}

347625 being the location code for Los Angeles and it works. However, if I use the code for my town 241911 it does not work because the accuweather sevice is not active anymore.

So, my question is: how do I modify the code to get the rss feeding from another website which displays the weather data for Ensenada, Mexico?



You must log in to answer this question.

Browse other questions tagged .