https://github.com/pythoninthegrass/static_flask
Medium tutorial for news aggregator in Flask
https://github.com/pythoninthegrass/static_flask
Last synced: about 1 year ago
JSON representation
Medium tutorial for news aggregator in Flask
- Host: GitHub
- URL: https://github.com/pythoninthegrass/static_flask
- Owner: pythoninthegrass
- Created: 2020-09-20T21:29:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-20T22:33:28.000Z (over 5 years ago)
- Last Synced: 2025-01-11T16:50:22.186Z (about 1 year ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# static_flask
[Medium tutorial](https://medium.com/swlh/baking-static-sites-with-python-and-jinja-330fe29bbe08) for news aggregator in Flask created by [@mattvh](https://github.com/mattvh).
## Setup
* Install [pipenv](https://realpython.com/pipenv-guide/)
* Clone repo
* Install dependencies
```bash
# clone
git clone https://github.com/pythoninthegrass/static_flask.git
cd static_flask/
# install pipenv dependencies
pipenv install
```
## Generate HTML only
* Move `style.css` out of public and template static directories
* Run `generator.py`
```bash
pipenv shell
python generator.py
open public/index.html
```
## Generate HTML + CSS
* Leave `style.css` in-place
* Run `generator.py`
```bash
pipenv shell
python generator.py
open public/index.html
```
## TODO
* Refactor with [News API](https://newsapi.org/docs/client-libraries/python)
* Setup Flask environment for localhost
* CI/CD
* Create API to update or hard-code articles
* Database to store previous days' hits
* Redesign CSS layout
* Deploy to Digital Ocean