Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ChrisCarini/trivia-box
Update a gist to contain a daily trivia question from Open Trivia DB
https://github.com/ChrisCarini/trivia-box
open-trivia open-trivia-api open-trivia-database open-trivia-db-api pinned pinned-gist
Last synced: 6 days ago
JSON representation
Update a gist to contain a daily trivia question from Open Trivia DB
- Host: GitHub
- URL: https://github.com/ChrisCarini/trivia-box
- Owner: ChrisCarini
- Created: 2021-12-15T10:11:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T21:27:17.000Z (16 days ago)
- Last Synced: 2024-10-26T15:08:43.983Z (13 days ago)
- Topics: open-trivia, open-trivia-api, open-trivia-database, open-trivia-db-api, pinned, pinned-gist
- Language: Python
- Homepage:
- Size: 147 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-pinned-gists - trivia-box - Update a pinned gist with a daily trivia question from Open Trivia DB. (External Services)
README
trivia-box
💻 Update a gist to contain a daily trivia question from Open Trivia DB
## 🎒 Prep Work
1. Create a new public GitHub Gist (https://gist.github.com/)
2. Create a token with the `gist` scope and copy it. (https://github.com/settings/tokens/new)
3. Copy the `API token`## 🖥 Project Setup
1. Go to your fork's `Settings` > `Secrets` > `Add a new secret` for each environment secret (below)
## 🤫 Environment Secrets
- **GH_TOKEN:** The GitHub token generated above.
- **GIST_ID:** The ID portion from your gist url:`https://gist.github.com/ChrisCarini/`**`ef9d16e87e0458fff84bf42c4e05894b`**.
(Alternatively this can be put directly in `.github/workflows/trivia.yml` as it is public anyway.)
## 🤓 Hacking
### Getting Setup
```shell
python3 -m venv venv
source activate
pip install -r requirements.txt
```### Saving Dependencies
```shell
source activate
pip-chill > requirements.txt
```### Running linting and tests
```shell
isort main.py trivia_box.py test/ && \
mypy main.py trivia_box.py test/ && \
flake8 main.py trivia_box.py test/ && \
blue --check main.py trivia_box.py test/ && \
pytest test/
```