Ubuntu - Conky
Author
Discussion

NickFRP

Original Poster:

5,160 posts

266 months

Thursday 11th October 2007
quotequote all
Has any one on here got any experience with getting the weather update on your conky script?

i cant get mine to work. got my gmail working though smile

NickFRP

Original Poster:

5,160 posts

266 months

Thursday 11th October 2007
quotequote all
punk

buggalugs

9,300 posts

268 months

Thursday 11th October 2007
quotequote all
Who you callin a punk??

NickFRP

Original Poster:

5,160 posts

266 months

Thursday 11th October 2007
quotequote all
buggalugs said:
Who you callin a punk??
:P
every one until i crack this soding weather shit
[b]
  1. !/bin/sh
  1. Grab weather data from weather.com and format it according to the given XSLT
  2. Script written by boojit
  3. Modified by Hellf[i]re
  4. Modified by Vredfreak
  5. The orignal script and xslt can be downloaded from http://pondol.com/weather.tar.gz
  1. Usage:
  2. ${execi 1800 /path/to/weather/weather.sh location}
  3. Usage Example:
  4. ${execi 1800 /home/user/weather/weather.sh 03833}
  1. your Location ID: use http://xoap.weather.com/search/search?where=[yourc... to find it
  2. U.S. users can just use their zip code; doubt that works for anyone else though (YMMV)
LOCID=LONDON

  1. s=standard units, m=metric units
UNITS=s

  1. where this script and the XSLT lives
RUNDIR=/home/nick/Mine/conky/conky-weather/

  1. there's probably other stuff besides CURL that will work for this, but i haven't
  2. tried any others.
  3. you can get curl at http://curl.haxx.se/
CURLCMD=/usr/bin/curl

  1. get it at http://xmlsoft.org/XSLT/
XSLTCMD=/usr/bin/xsltproc

  1. you probably don't need to modify anything below this point....
  1. CURL url. Use cc=* for current forecast or dayf=10 to get a multi-day forecast
CURLURL="http://xoap.weather.com/weather/local/$LOCID?dayf=10&unit=$UNITS&cc=*"

  1. The XSLT to use when translating the response from weather.com
  2. You can modify this xslt to your liking
XSLT=$RUNDIR/weather.xslt

  1. filter (if you want to convert stuff to lower-case or upper case or something)
  2. FILTER="|gawk '{print(tolower(\$0));}'"

  1. ###
eval "$CURLCMD \"$CURLURL\" 2>/dev/null| $XSLTCMD $XSLT - $FILTER"
[/b]

NickFRP

Original Poster:

5,160 posts

266 months

Thursday 11th October 2007
quotequote all
its ok team.. i done it... but then i ed it all up and will now have to restore to an image of my machine i took this morning. but at least i know what i did to ix it and where i went wrong

buggalugs

9,300 posts

268 months

Thursday 11th October 2007
quotequote all
Punk :P