description | My changes to org-weather |
owner | jr0@riseup.net |
last change | Wed, 31 Jan 2018 06:16:44 +0000 (31 07:16 +0100) |
URL | git://repo.or.cz/org-weather.git |
| https://repo.or.cz/org-weather.git |
push URL | ssh://repo.or.cz/org-weather.git |
| https://repo.or.cz/org-weather.git (learn more) |
bundle info | org-weather.git downloadable bundles |
content tags
|
|
README.org
* Overview
org-weather is a small elisp script for displaying weather data from
openweathermap.org in your org-mode agenda. I wrote this because the
existing package is based on the google api which was discontinued:
https://julien.danjou.info/projects/emacs-packages#google-weather
* Installation
Clone the repository using:
: git clone http://github.com/kautsig/org-weather.git
Add this to your .emacs file:
: ;; Load the org-weather library
: (add-to-list 'load-path "~/<path-to>/org-weather")
: (require 'org-weather)
: ;; Set your location and refresh the data
: (setq org-weather-location "London,UK")
: (org-weather-refresh)
You can customize the string displayed in your agenda using this in
your .emacs file. For available wildcards have a look at the source
(it's simple).
: (setq org-weather-format "Weather: %desc, %tmin-%tmax%tu, %p%pu, %h%hu, %s%su")
Add this to one of your org files:
: * Weather
: %%(org-weather)
When you view your agenda, you should now see the weather for today
and the forecast for next week. You can refresh weather data by
calling:
: M-x org-weather-refresh
If you want to show fahrenheit instead of celsius and MPH instead of m/s, you can add these 3
lines to your emacs configuration:
: (setq org-weather-api-url "http://api.openweathermap.org/data/2.5/forecast/daily?q=%s&mode=json&units=imperial&cnt=7&APPID=%s")
: (setq org-weather-temperature-unit "°F")
: (setq org-weather-speed-unit "MPH")
** openweather API Key.
The [[http://openweathermap.org/api][openweather]] site now requires you to sign up for an API key. You
can choose a free key or various paid options. You need to add the API
key to your .emacs:
: (setq org-weather-api-key "YourAPIKey")
* Data License
According to http://openweathermap.org/price:
#+BEGIN_QUOTE
All data provided by OpenWeatherMap are distributed under terms of the
Creative Commons license
http://creativecommons.org/licenses/by-sa/2.0/.
#+END_QUOTE
To apply with the license the name "OpenWeatherMap" was added to the
string displayed in your agenda.
* Disclaimer
I'm not a lisp developer and of course you know how to do better. If
so, pull requests are kindly appreciated.