Hi Thorsten, first of all, thanks for your suggestions, I really appreciate it.
tjol...@gmail.com writes: > Chris Raschl <c...@kautsig.org> writes: > >> Hi everybody, >> >> recently I wanted to add a weather forecast to my org-agenda. I found >> org-google-weather, but this package is obsolete since 2012, because the >> API is not available any more. So I wrote my own version which is backed >> by the openweathermap.org API. >> >> I implemented the minimal usecase which works for me, if somebody else >> dares to use it, its available here: >> >> https://github.com/kautsig/org-weather > > Nice, thank you, never made org-google-weather, but this works > out-of-the-box: > > ,------------------------------------------------- > | City: Weather: light rain, 10.43°C - 17.58°C > `------------------------------------------------- > > A few suggestions wrt [...] > - why not use (round ...) for the temperature data, 10-17°C would be > more than accurate enough? I added this. Additionally I removed the temperature unit being displayed twice, this was unnecessary and looks much nicer in the format you suggested. > - why not include city/country info in the weather string? I added > > * Weather > :PROPERTIES: > :CATEGORY: City > :END: > %%(org-weather) > > to get the above, but it would be much better to take the return > values for city/country and include them in the weather string, to > make sure one did not mess up the configuration and gets the weather > from another place than expected. Also thought about this, but I think I will go with the method which was also used in org-google-weather. It looks like: * Weather %%(org-google-weather "New York") This is much simpler for me, as I'm not so familiar with lisp and the org-mode api. But I'll have to change the data structure for caching the data a bit, so it might take a while. > - maybe make the whole thing a bit customizable by adding a few > defcustoms, so the user can decide which info he wants to print in the > agenda > > the return string looks like this, there are many options: [...] I improved result processing a little bit and added a formatting string (org-weather-format). You can now also add different temperature fields, as well as humidity, pressure and wind speed. Regards, Chris