TAWG stands for "Time alone with God." TAWG takes many forms, including Bible reading. This script powers an automated GroupMe bot designed to track and announce daily Bible reading streaks for a group. It collects check-in messages from designated GroupMe chats, calculates each user's reading streak, and posts a leaderboard to a GroupMe groupchat channel.
- Daily Streak Tracking: Monitors check-in messages to determine which users have read each day.
- Leaderboard Posting: Automatically posts a formatted leaderboard of current streaks to a GroupMe group.
- Persistent Streak Storage: Uses a Supabase-hosted Postgres database for persistence across runs.
- User Check-ins: Users post numbered check-in messages (e.g.,
1),2)) in designated GroupMe chats. - Data Collection: The script fetches recent messages from these chats and parses check-ins.
- Streak Calculation: Streaks are updated based on whether users checked in for the day.
- Leaderboard Generation: A sorted leaderboard is created and posted to a GroupMe group.
- Persistence: Streaks are saved to a Supabase Postgres database for future runs.
main.py- Main logic for fetching check-ins, updating streaks, and posting the leaderboard.constants.py- Stores configuration values and environment variables used throughout the project.requests_utils.py- Utility functions for making HTTP requests.dump.py- Utility for dumping user data from GroupMe for testing.tests/- Unit tests and example data.
This project is licensed under the MIT License. See LICENSE