Merge pull request #7 from jamesrichardsonjr/master
[org-weather.git] / README.org
blob07f9ec9548346c220a84df454f19035a045deb1d
1 * Overview
2 org-weather is a small elisp script for displaying weather data from
3 openweathermap.org in your org-mode agenda. I wrote this because the
4 existing package is based on the google api which was discontinued:
6 https://julien.danjou.info/projects/emacs-packages#google-weather
8 * Installation
9 Clone the repository using:
11 : git clone http://github.com/kautsig/org-weather.git
13 Add this to your .emacs file:
15 : ;; Load the org-weather library
16 : (add-to-list 'load-path "~/<path-to>/org-weather")
17 : (require 'org-weather)
18 : ;; Set your location and refresh the data
19 : (setq org-weather-location "London,UK")
20 : (org-weather-refresh)
22 You can customize the string displayed in your agenda using this in
23 your .emacs file. For available wildcards have a look at the source
24 (it's simple).
26 : (setq org-weather-format "Weather: %desc, %tmin-%tmax%tu, %p%pu, %h%hu, %s%su")
28 Add this to one of your org files:
30 : * Weather
31 : %%(org-weather)
33 When you view your agenda, you should now see the weather for today
34 and the forecast for next week. You can refresh weather data by
35 calling:
37 : M-x org-weather-refresh
39 If you want to show fahrenheit instead of celsius and MPH instead of m/s, you can add these 3
40 lines to your emacs configuration:
42 : (setq org-weather-api-url "http://api.openweathermap.org/data/2.5/forecast/daily?q=%s&mode=json&units=imperial&cnt=7&APPID=%s")
43 : (setq org-weather-temperature-unit "°F")
44 : (setq org-weather-speed-unit "MPH")
46 ** openweather API Key.
47 The [[http://openweathermap.org/api][openweather]]  site now requires you to sign up for an API key. You
48 can choose a free key or various paid options. You need to add the API
49 key to your .emacs:
51 : (setq org-weather-api-key  "YourAPIKey")
53 * Data License
55 According to http://openweathermap.org/price:
57 #+BEGIN_QUOTE
58 All data provided by OpenWeatherMap are distributed under terms of the
59 Creative Commons license
60 http://creativecommons.org/licenses/by-sa/2.0/.
61 #+END_QUOTE
63 To apply with the license the name "OpenWeatherMap" was added to the
64 string displayed in your agenda.
66 * Disclaimer
67 I'm not a lisp developer and of course you know how to do better. If
68 so, pull requests are kindly appreciated.