emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Google-weather.el and the Latest Git Version of Org-mode


From: Ian Barton
Subject: Re: [O] Google-weather.el and the Latest Git Version of Org-mode
Date: Wed, 05 Sep 2012 08:37:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 04/09/12 08:54, Ian Barton wrote:
On 31/08/12 14:19, Carson Chittom wrote:
Jude DaShiell <address@hidden> writes:

It might be near time to investigate wunderground.com and loose
google for
weather before igoogle disappears.  Other weather sites capable of text
output may also be available, I haven't investigated that yet.

For those in the US, the National Weather Service has forecasts
available in XML, which could be parsed, requestable via latitude and
longitude.  I haven't done anything with that other than noting its
existence.  URL seems to be
http://forecast.weather.gov/MapClick.php?lat=xx.xxxx&lon=yy.yyyy&FcastType=dwml





There is also Yahoo, which uses The Weather Channel. Their official
interface is documented at http://developer.yahoo.com/weather/ This
returns a three day forecast. However, there is an undocumented
interface that returns a five day forecast. See
http://xml.weather.yahoo.com/forecastrss/UKXX0718_c.xml for an example
forecast.

I have a python script that uses the undocumented interface, which I'll
put on Github when I have tidied it up a bit. It doesn't look too hard
to adapt the current googleweather.el script to use Yahoo.


I have pushed my python script to https://github.com/geekinthesticks/python-yahoo-weather

This shows how to retrieve the five day forecast from Yahoo, with an example XML page of the results returned by Yahoo. As an added benefit Yahoo also returns the lat, long, sunrise and sunset data. For people in the UK, there is a complete list of all location codes for towns and cities.

I have also included a copy of Julien Danjou's original library for Google in the repo. As a first step I renamed all occurrences of Google to Yahoo. Other than that it doesn't do anything useful yet.

Since my elisp skills are very limited, if anyone else wants to hack on this too, I would be more than happy to merge your changes.

Ian.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]