reddit / emacs

Emacs weather packages

dcreno · 2022-04-01 14:59
Can I get a recommendation on the best emacs weather package? I'd like to see a simple 7-10 day forecast, probably in a separate buffer, doesn't need to be integrated into the modeline. Here's what I've found so far that looks OK but not clear if it's still maintained as it was last updated in 2017: [https://github.com/bcbcarl/emacs-wttrin](https://github.com/bcbcarl/emacs-wttrin)
brotzeitmacher · 2022-04-01 16:59
If it provides the features you want maybe it's not necessary that the package is maintained.
dcreno · 2022-04-01 17:01
Yes, I'm thinking of that. I only see a couple of issues filed and they look like feature requests so that's probably the case.
brotzeitmacher · 2022-04-01 17:18
And if something doesn't work you have a good opportunity to get your hands dirty and learn some elisp.
dcreno · 2022-04-01 18:52
I appreciate the suggestion, but as per the original post, I'm really just looking for suggestions of working software. ;)
Danrobi1 · 2022-04-01 18:53
Well thats wttr.in. You dont need a package for that. Bookmark it or just set an alias for it, no?
XCapitan_1 · 2022-04-01 21:07
It just looks like there aren't many good weather APIs available. I didn't research the topic too much, but I know that a lot of such APIs were closed in recent years. Older Emacs weather packages don't work because of that. The wttr.in package is actually dead simple, it just prints out the result of the request to wttr.in. You can `curl wttr.in` to get the same. But you probably need to use [this fork](https://github.com/etiago/emacs-wttrin/tree/user-agent-fix). And it doesn't seem to provide a long-term forecast anyhow.
BettaGeorge · 2022-04-01 22:36
As another poster has said, a lot of open weather APIs have disappeared in recent years. For reasonably good forecasts you might even want to look for an API from your local weather service. Of course, the probability that there happens to be an emacs package just for that is small. But if it is easy to parse, maybe just run it through a few elisp regexes yourself and print it to a buffer?
kcin · 2022-04-02 03:27
Here's a simple solution which you may find interesting and flashy: https://i.imgur.com/ioR2mv2.png It's static, but it's a simple way to keep an eye on web content. It works with any site and you can tweak the sizes to make it work with your frame size: https://reddit.com/r/emacs/comments/d1d71t/display_web_content_in_emacs_as_is_example/
dcreno · 2022-04-02 17:50
Yes, it's looking to me right now that my best approach is to find a weather web page and keep it in a buffer and reload as needed. I was wondering/hoping that there was something nicer available as a package, maybe something concise.
dcreno · 2022-04-02 17:53
I started looking at the NOAA (USA) API and it looks great. Maybe when I get a little more free time this summer I'll play with it and some elisp: https://www.weather.gov/documentation/services-web-api?prevfmt=application%2Fcap%2Bxml&prevopt=area%3DMN#/default/obs\_stations
dcreno · 2022-04-02 17:56
Thanks, yes, as I mentioned on another reply, I may play around with this approach when I have a little more time this summer. Thanks for replying!
Mixermassiv · 2022-04-17 23:14
If you are still interested: Here is a piece of code which displays weather data fetched from `wttrin` in the modeline: https://github.com/opensource-philosophy/wttrin-weather-modeline
dcreno · 2022-04-18 11:07
Thanks, I will have a look!
dathomp1 · 2022-07-21 05:39
I've tried to put together something for NOAA. Perhaps you'll find it helpful. https://github.com/thomp/noaa
dcreno · 2022-07-22 14:49
Yep, I was the one that filed this: [https://github.com/thomp/noaa/issues/8](https://github.com/thomp/noaa/issues/8). Thanks for fixing that and putting the effort in to share it! I just updated it and had some 500's from the API. Of course, when I turn on toggle-debug-on-error it works fine. I'll play with it a bit.