descriptionMy changes to org-weather
ownerjr0@riseup.net
last changeWed, 31 Jan 2018 06:16:44 +0000 (31 07:16 +0100)
content tags
add:
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.
shortlog
2018-01-31 kautsigMerge pull request #7 from jamesrichardsonjr/mastermaster
2018-01-31 James RichardsonAdd note about MPH
2016-06-01 Chris RaschlAdd info about fahrenheit to the README
2015-10-18 Chris RaschlMerge branch 'ianbarton-ian'
2015-10-18 Chris RaschlRemove duplicate ampersand from URL
2015-10-13 Ian BartonAPI key configuration.
2015-10-13 Ian BartonAdd openweather API key.
2014-06-16 Chris RaschlAdd data license notice
2014-06-15 Chris RaschlAdd API timeout of 2 seconds to avoid blocking
2014-06-15 Chris RaschlFix wrong wildcard replacement
2014-06-15 Chris RaschlAdd more formatting options
2014-06-14 Chris RaschlFix code block in README
2014-06-14 Chris RaschlAdd license and readme
2014-06-14 Chris RaschlAdd min max temperature, ignore nil values in agenda
2014-06-13 Chris RaschlTried to hide nil-values
2014-06-04 Chris RaschlAdd autoloading on first call
...
heads
6 years ago master