


This is a fun little section to put on a readme, which allows viewers to vote on a controversial programming debate.
Every 8 hours, a Github Action is set to pick a new question and reset the counts. There are buttons to vote, which send a request to a remote server, which manages the counts.
Your vote may not appear instantly, due to Github Image caching. A Github Action force resets the cache every 30 minutes, otherwise wait a few minutes and it may appear.
- Fork this repository.
- Use Nest or similar to host
server.py
(a flask app) - Update all references to
https://froggerapi.madavidcoder.hackclub.app
withinupdater.py
and the below snippet, to the url that your flask app listens to. - Add the below snippet into your
README.md
file, to display the questions:## Programmer Debate ### <!-- Question starts -->Questions will appear here!<!-- Question ends --> #### Vote [<kbd> <br> <!-- Option 1 starts -->Option 1!<!-- Option 1 ends --> <br> </kbd>][Option 1] [<kbd> <br> <!-- Option 2 starts -->Option 2!<!-- Option 2 ends --> <br> </kbd>][Option 2] #### Here's what the internet thinks! <!-- Results 1 starts --> Results will appear here! <!-- Results 1 ends --> <!-- Results 2 starts --> Results will appear here! <!-- Results 2 ends --> --- <sup><sub>A new question will appear every six hours, check [MadAvidCoder/ReadmeProgrammerDebates](https://github.com/MadAvidCoder/ReadmeProgrammerDebates) to see how it works!</sub></sub> <!-- Links --> [Option 1]: https://<your-server-url>/option-1 [Option 2]: https://<your-server-url/option-2
- Add
build.yml
andreset.yml
to your.github/workflows
folder, so that the questions and results will automatically update.