1
I want to show the weather for my location, Ensenada, BC, Mexico on conky. I have tried the following script:
#!/bin/sh
METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
echo
echo "USAGE: weather.sh <locationcode>"
echo
exit 0;
fi
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?
2
Try it:
– d1553ct10n – 2019-03-06T05:03:25.317curl wttr.in
(https://github.com/schachmat/wego)Thanks, pretty cool app, but how would I show that in conky? – black-clover – 2019-03-07T05:35:43.437