A Slack bot for managing hackathon organizer schedules and shifts.
- Organizer Management: Add and edit organizer information
- Shift Management: Add, edit, and delete individual shifts
- Schedule Management: Bulk import schedules from CSV data
- Schedule Viewing: View schedules for specific dates
- Schedule Clearing: Clear all shifts for a specific date
/add_organizer- Add yourself as an organizer/edit_organizer- Update your organizer information
/add_shift <name> <start_time> <shift_type> <location>- Add a single shift/edit_shift <name> <start_time> <shift_type> [new_name] [new_start_time] [new_shift_type] [new_location]- Edit an existing shift
/add_schedule <filename>- Import a complete schedule from a CSV file in the schedule folder/clear_schedule <date>- Clear all shifts for a specific date
Place your CSV schedule files in the schedule/ folder. The bot automatically maps filenames to dates:
friday.csv→ 2024-09-13saturday.csv→ 2024-09-14sunday.csv→ 2024-09-15
Note: You can customize these date mappings in the extract_date_from_filename() function in app/slack.py to match your actual hackathon dates.
12:00 AM- 12-hour format with AM/PM00:00- 24-hour format (automatically converted)
MM/DD/YYYY- e.g.,09/14/2024YYYY-MM-DD- e.g.,2024-09-14Month DD, YYYY- e.g.,September 14, 2024
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
SLACK_BOT_TOKEN=your_slack_bot_token SLACK_SIGNING_SECRET=your_slack_signing_secret SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_key SLACK_CHANNEL=your_slack_channel
-
Run the application:
python app/app.py
Run the CSV parsing test:
python test_csv_parsing.pyThe application uses Supabase with the following tables:
organizer_id(primary key)name
namestart_timeshift_typelocation
- Place your CSV file in the
schedule/folder - Use the command:
/add_schedule <filename>(e.g.,/add_schedule saturday.csv) - The bot will read the file and add all shifts to the database
- Clear a specific date:
/clear_schedule 09/14/2024
The bot provides helpful error messages for:
- Invalid CSV format
- Missing date information
- Database connection issues
- Invalid date formats
Feel free to submit issues and enhancement requests!