kautsig / org-weather

Weather forecast for the org-mode agenda.
MIT License
28 stars 9 forks source link

Units #6

Closed ghost closed 8 years ago

ghost commented 8 years ago

How do I get Fahrenheit?

ghost commented 8 years ago

I did this mod but it would be nice to integrate it better.

(defun org-weather-temp (temperature field) "Extracts a given field element from a 'temp' element" (+ (/ (* (cdr (assoc field temperature)) 9) 5) 32))

ghost commented 8 years ago

NVM above, this seems to be the way:

;; The api url, no need to change ususally ;;(defvar org-weather-api-url "http://api.openweathermap.org/data/2.5/forecast/daily?q=%s&mode=json&units=metric&cnt=7&APPID=%s") (defvar org-weather-api-url "http://api.openweathermap.org/data/2.5/forecast/daily?q=%s&mode=json&units=imperial&cnt=7&APPID=%s")

kautsig commented 8 years ago

Hi jtgd,

thanks for your efforts. To clarify this for new users I added it to the README, because it was also asked in #5 already.

Regards, chris