Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/sh
  2. #AccuWeather (r) RSS weather tool for conky
  3. #Requires curl and perl.
  4. #USAGE: weather.sh <locationcode>
  5. #
  6. #(c) Michael Seiler 2007
  7.  
  8. METRIC=0 #Should be 0 or 1; 0 for F, 1 for C
  9.  
  10. if [ -z $1 ]; then
  11. echo
  12. echo "USAGE: weather.sh <79772>"
  13. echo
  14. exit 0;
  15. fi
  16.  
  17. curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'