Friday, September 10, 2010

Weather for emacs and orgmode

On 09 Sep 2010 Julien Danjou provided a way to access the Google weather API from emacs. Additionally, the weather can easily be integrated into an orgmode agenda.

cd ~/Projects/git/
git clone git://

Then we set up emacs in the following way

(add-to-list 'load-path "~/Projects/git/google-weather-el")
(require 'google-weather)
(require 'org-google-weather)

To add the weather to the agenda, put a call to org-google-weather with the city (e.g. "Webster, NY") or postal code (e.g. "14580") in an org file that is used by the agenda. Multiple weather locations can be included and the #+CATEGORY option can be used to distinguish them in the agenda.

#+CATEGORY: Webster, NY
%%(org-google-weather "Webster, NY")
#+CATEGORY: Washington, DC
%%(org-google-weather "Washington, DC")

The Google weather API is apparently very well undocumented (, but the following call will retrieve an XML response.

Other APIs that might be of interest are stock quotes

movie listings

and a news feed

Neat stuff.

No comments:

Post a Comment