A Matrix chat bot for Jupiter Broadcasting's "The Lunch" chat room that collects and posts title suggestions.
### From the Owner
This has gotten out of hand. I've been woking 7 days a week for a couple years now and this has been my most recent mortar between the bricks of time that I've been squeezing out of my life between sleep. Simplification needs to happen whenever possible.
# Technical Outline
At the moment, there are 6 processes that make up the whole project and must be run simultaneously:
- scraper.py
- post_results.py
- get_user_list.py
- get_votes.py
- jsonEndpoint/jep
- voteServer/vs
### scraper.py
What it says on the tin. Reads configured target matrix room and collects suggestions
### post_results.py
Listens for the !gettitles command and readies the votes
### get_user_list.py
Gets a list of users in the room who have more than n votes and puts them in a database so that the voting can have some degree of validation beyond random voters being allowed in.
### get_votes.py
Listens for the !getvotes command in the chat room, reads the output of the http voting, and writes the results back to the room
### jsonEndpoint/jep
Provides a json endpoint for a list of all provided votes and who voted for them
### voteServer/vs
Provides a webpage where voters can vote
## Features
- **Suggestion Collection**: Monitors chat for messages starting with `!suggest`, `!Suggest`, `!suggestion`, `!Suggestion`, `SUGGEST`, or `!sug`
- **Interactive Voting**: Posts suggestions individually with 👍 reactions for voting
- **Command System**:
-`!gettitles` - Triggers posting of collected suggestions
-`!mayhem` - Generates chaotic text using Ollama AI
-`!countvotes` - Counts upvotes on posted suggestions
-`!getvotes` - Posts current vote results from the voting server
-`!voteurl` - Shares the voting URL where users can cast their votes
- **Persistent Storage**: SQLite database per room with duplicate prevention
- **Acknowledgment System**: Reacts with ✅ to confirm suggestion collection
- **Web Voting Interface**: Dedicated voting server with vote validation
## Quick Start
1. Create and activate a Python virtual environment: