Skip to content

Commit

Permalink
Merge pull request #44 from wengole/master
Browse files Browse the repository at this point in the history
Fixed URLs for BBCWeather
  • Loading branch information
helmuthdu committed Mar 12, 2013
2 parents 618069a + 745649b commit 8345a10
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions conkycolors/bin/conkyBBCWeather
Expand Up @@ -10,22 +10,22 @@ UNIT="c"

if [ "$3" == "$UNIT" ]; then
if [ "$1" == "$CUR" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/ObservationsRSS.xml" | sed -n '/Temperature/p' | sed -e 's/°/ /g' | sed -e 's/%/%/g' | sed 's/^.*Temperature: //' | sed 's/ C.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/observations.rss" | sed -n '/Temperature/p' | sed -e 's/°/ /g' | sed -e 's/%/%/g' | sed 's/^.*Temperature: //' | sed 's/ C.*$//'
elif [ "$1" == "$MAX" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Max Temp: //' | sed 's/ C.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Max Temp: //' | sed 's/ C.*$//'
elif [ "$1" == "$MIN" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Min Temp: //' | sed 's/ C.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Min Temp: //' | sed 's/ C.*$//'
elif [ "$1" == "$HUMIDITY" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
fi
else
if [ "$1" == "$CUR" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/ObservationsRSS.xml" | sed -n '/Temperature/p' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Temperature: [0-9]* C (//' | sed 's/ F.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/observations.rss" | sed -n '/Temperature/p' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Temperature: [0-9]* C (//' | sed 's/ F.*$//'
elif [ "$1" == "$MAX" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Max Temp: [0-9]* C (//' | sed 's/ F.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Max Temp: [0-9]* C (//' | sed 's/ F.*$//'
elif [ "$1" == "$MIN" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Min Temp: [0-9]* C (//' | sed 's/ F.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Min Temp: [0-9]* C (//' | sed 's/ F.*$//'
elif [ "$1" == "$HUMIDITY" ]; then
curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
fi
fi
fi

0 comments on commit 8345a10

Please sign in to comment.