Ryan Roth wrote: Wow Ryan, your working like a beaver, many thanks.
> File to go along with request on sf.net page > > > ------------------------------------------------------------------------ Needs a header block. # -*- coding: iso-8859-1 -*- is most important > """ > Requires cron to call "freevo execute > /usr/lib/python2.4/site-packages/freevo/plugins/weather_helper.py" freevo weather # program goes to src/helpers > to get updates. The weather.py plugin will grab new data if the cache is > older than two hours, > so run your cron job more often than that. > """ > import os > import urllib > import config > > location = [] > dataurl = [] > WEATHER_DIR = os.path.join(config.SHARE_DIR, 'images', 'weather') > for local in config.PLUGIN_WEATHER_LOCATIONS: > location = local[0] > dataurl = "http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=%s" % > location > mapurl = "http://w3.weather.com/weather/map/%s?from=LAPmaps" % location Need to make the dirs, if they don't exist, otherwise if will fail. > cacheDir = '%s/weather_%s' % (config.FREEVO_CACHEDIR, location) > cacheFile = '%s/data' % (cacheDir) > mapFile = '%s/map' % (cacheDir) > Need to redirect the output from wget to /dev/null, otherwise you will get an email every two hours from cron. > os.system ('wget %s -O %s' % (dataurl, cacheFile )) > os.system ('wget %s -O %s' % (mapurl, mapFile )) I have added it to rel-1 at r8785. Thanks again Duncan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel