An alternative quote system for Streamerbot with expanded functionality. This is a Python-based quote management system designed to integrate with Streamerbot for managing memorable moments and quotes from your stream.
- Add quotes with associated metadata (user, game, timestamp)
- Retrieve quotes by ID or get a random quote
- Search quotes by various criteria
- Delete quotes with automatic ID optimization
- Quote facts tracking and statistics
- Timezone support with automatic timestamp conversion
- JSON-based storage for easy backup and integration
- Customizable username for colloquial references in outputs
- Python 3.7+
- Streamerbot installation (for integration)
- Clone or download this repository
- Install dependencies:
pip install -r requirements.txt
- Copy and configure the config file:
cp config.example.yaml config.yaml
- Edit
config.yamlwith your settings (see Configuration below)
Create a config.yaml file in the project root with the following settings:
# Your username (or colloquial version used on stream)
# Used in quote fact outputs
colloquial_username: Capn
# Valid timezone from pytz
# See: https://gist.github.com/heyalexej/8bf688fd67d7199be4a1682b3eec7568
timezone: America/ChicagoIf config.yaml is not found, defaults will be used:
colloquial_username: "streamer"timezone: "UTC"
python quote-add.py <user_id> <username> <game_id> <game_name> "<quote_text>"Adds a new quote with timestamp and associated metadata.
python quote-get.py [quote_id]quote-get.py- Returns a random quotequote-get.py 5- Returns quote with ID 5
python quote-latest.pyRetrieves the most recently added quote.
python quote-search.py <search_term>Searches quotes by content, user, or game.
python quote-delete.py <quote_id>Removes a quote by ID and optimizes remaining IDs.
python quote-facts.pyDisplays statistics and facts about your quotes.
streamerbot-quotebot/
├── quote-add.py # Add new quotes
├── quote-delete.py # Delete quotes
├── quote-facts.py # View quote statistics
├── quote-get.py # Retrieve quotes
├── quote-latest.py # Get most recent quote
├── quote-search.py # Search quotes
├── constants.py # Configuration and constants
├── utils.py # Shared utilities
├── config.example.yaml # Configuration template
├── requirements.txt # Python dependencies
├── quotes.json # Quote database (auto-created)
└── README.md # This file
The scripts generate output files for Streamerbot integration:
quote.txt- Quote outputlatest_quote.txt- Latest quotequote_add_output.txt- Add operation resultquote_delete_result.txt- Delete operation resultquote_fact.txt- Quote factsquote_output.txt- General quote output
- pytz - Timezone handling
- pyyaml - Configuration file parsing
See requirements.txt for version details.
To use these scripts with Streamerbot, configure your action commands to call the appropriate Python scripts and read the generated output files to display results in chat or logs.
See LICENSE file for details.