Giter Club home page Giter Club logo

whethr's Introduction

requirements

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)

decisions:

remote weather api:

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.

software stack:

nginx flask

URL paths and functions

/ (root)

  • [X] the root path forwards to /should_wear_a_hat

/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)

? /subscribe

  • [ ] generate and save confirmation token into confirm db
  • [ ] send confirmation email

? /confirm

  • [ ] confirm confirmation token
  • [ ] save email address into email db

? /unsubscribe

  • [ ] removes address from the ‘email’ parameter from email db

tasks

setup ssl [3/3]

  • [X] hosting on digitalocean
  • [X] whethr.info domain
  • [X] whethr.info ssl cert

get location [3/3]

  • [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)

read weather info for now

  • [X] read weather

decide on a hat or not

  • [X] if it is <60F, wear a hat

show it [3/5]

  • [X] location form
  • [X] client-side location
  • [X] make it pretty
  • [ ] AJAX from client-side
  • [ ] ? email subscription form

email [0/4]

  • [ ] subscription database
  • [ ] confirmation email
  • [ ] schedule email delivery
  • [ ] look up the weather and send email

Docker

  • [ ] base docker image with nginx and wsgi
  • [ ] docker image with app
  • [ ] deploy docker image

whethr's People

Contributors

spirozh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.