Initial requirements statement:
Write a python/javascript/html script that gets the weather (from a remote api of your choice) and prints the average temperature or does something cool with that data)
remote weather api:
- OpenWeatherMap (www.openweathermap.org), use PyOWM
something cool: 1: tell the user whether they should wear a hat 2: ? notify the user by email (or browser push?) if the recommendation changes
in order to get location from the browser, the site needs to have https enabled. in order to have https enabled, an ssl cert is needed, in order to get an ssl cert, a domain is needed.
nginx flask
- [X] the root path forwards to /should_wear_a_hat
- [X] no ‘lat’ and ‘lon’ parameter use the location associated with the remote_addr from the request. if there is no location, use my house as the location (python)
- [X] say to wear a hat or not says to wear a hat if its cold outside at the location (python)
- [X] user location user sets the ‘placename’ parameter on the page as city name, form resends the request with the specified location (html form)
- [X] browser location
if there was no ‘placename’ parameter and the browser will give the
location, resend the request with the ‘lat’ and ‘lon’ parameters (javascript)
- [X] get the location from the browser
- [X] resend request
- [ ] AJAX request json instead of html and insert the result into the DOM instead of reloading (javascript)
- [ ] ? user subscribe subscribe to an email that tells you every day to wear a hat or not (html form)
- [ ] generate and save confirmation token into confirm db
- [ ] send confirmation email
- [ ] confirm confirmation token
- [ ] save email address into email db
- [ ] removes address from the ‘email’ parameter from email db
- [X] hosting on digitalocean
- [X] whethr.info domain
- [X] whethr.info ssl cert
- [X] check ip address first (set lat,lon)
- [X] user - enter the location (convert city to lat,lon)
- [X] browser - request location (as lat,lon)
- [X] read weather
- [X] if it is <60F, wear a hat
- [X] location form
- [X] client-side location
- [X] make it pretty
- [ ] AJAX from client-side
- [ ] ? email subscription form
- [ ] subscription database
- [ ] confirmation email
- [ ] schedule email delivery
- [ ] look up the weather and send email
- [ ] base docker image with nginx and wsgi
- [ ] docker image with app
- [ ] deploy docker image