schachmat / wego

weather app for the terminal
ISC License
7.79k stars 467 forks source link

Split we.go into backends and frontends #1

Closed quite closed 8 years ago

quite commented 9 years ago

Suggestions: support http://openweathermap.org/api

schachmat commented 9 years ago

As far as I can see, they do not support ssl encryption. You should be aware, that any passive adversary inbetween you and the openweathermap server gets to know which locations weather you're interested in and can therefore probably conclude, where you live and where you're going to travel to in the next few days.

However, I already thought about splitting wego in backends and frontends. Each backend would then get the requested data from one specific API and convert it to a wego-specific format. Each frontend would take weather data in wego-specific format and reformat it for nice (current implementation) / parseable (just json?) / simple (a few lines of uncolored text?) / … output.

Patches are welcome, if you're interested, otherwise this backend/frontend separation will probably be done by myself sometime soon(tm).

quite commented 9 years ago

All right. Yeah, I see now that only paid plans offer SSL. I'm personally don't bother to force ssl on weather and similar programs, but I understand those who do.

lacombar commented 9 years ago

FWIW, this "open" weather map do not seem to be that "open".

lacombar commented 9 years ago

The wikipedia article about OWM talks about NOAA provided data. It might be interesting to check if NOAA provide SSL access to these data...

lacombar commented 9 years ago

Here is NOAA API informations: http://graphical.weather.gov/xml/ The site seems to answer on port 443, but the certificate domains doesn't match and the connection does not seem to make any progress.

schachmat commented 9 years ago

Some Ideas and plans:

I recommend extrating the backend first.

schachmat commented 8 years ago

I finally managed to implement a satisfying solution for config+flag management and split the backend. You can have a peek at it on the issue1 branch @a9c2c6f. The frontend split should now be straight-forward and done within the week.

schachmat commented 8 years ago

Finally done and merged into master.