No description
- Python 78.1%
- HTML 20.1%
- Shell 1.8%
|
|
||
|---|---|---|
| indico_plugin_category_reminder | ||
| .gitignore | ||
| CHANGELOG.md | ||
| MANIFEST.in | ||
| new-release.sh | ||
| pyproject.toml | ||
| README.md | ||
| setup.cfg | ||
| setup.py | ||
indico-plugin-category-reminder
An Indico 3.3 plugin that sends automatic reminder emails for events in configured categories.
Table of Contents
- Features
- Installation
- Usage
- Template Variables
- How Reminders Are Dispatched
- Database Schema
- Development & Testing
- Troubleshooting
- Contribution Guide
- License
Features
- 📧 Per-category rules – configure one or more reminder rules per category
- 👥 Custom recipient lists – any list of email addresses, not just event participants
- 🕐 Flexible timing – advance reminder N days before (default: 7) + day-of morning reminder
- ✏️ Jinja2 email templates – full access to event title, date, speakers, abstract, URL, etc.
- 👁️ Live preview – preview the rendered email against a real upcoming event before saving
- 🔒 Duplicate prevention – sent reminders are tracked so emails are never resent
- ⚙️ Category management UI – integrated into Indico's native category management sidebar
Installation
pip install indico-plugin-category-reminder
Then run the database migration:
indico db upgrade --plugin category_reminder
Enable the plugin in your Indico admin panel under Admin → Plugins.
Usage
- Navigate to a category and open Category Management.
- Click Event Reminders in the left sidebar.
- Click Add reminder rule.
- Fill in:
- Rule name – human-readable label
- Recipients – one email address per line
- Subject template – Jinja2 template string
- Body template – HTML Jinja2 template
- Days before – how many days in advance to send (0 = disabled)
- Day-of reminder – whether to also send on the event morning
- Send hours – UTC hour for each reminder type
- Click Preview to verify the rendered output against a real event.
- Save and you're done — Celery handles the rest automatically.
Template Variables
The following variables are available in both subject and body templates:
| Variable | Description |
|---|---|
event |
The Indico Event object |
event.title |
Event title |
event.start_dt |
Start datetime (use ` |
event.end_dt |
End datetime |
event.room_name |
Room name |
event.venue_name |
Venue/building name |
event.description |
Event description |
event.external_url |
Public URL of the event |
speakers |
List of speaker PersonLink objects |
speaker.full_name |
Speaker's full name |
speaker.affiliation |
Speaker's affiliation |
abstract |
Abstract text (first contribution or event description) |
config |
The CategoryReminderConfig object |
Filters
| Filter | Example |
|---|---|
format_date |
`{{ event.start_dt |
format_datetime |
`{{ event.start_dt |
Example subject template
Reminder: {{ event.title }} – {{ event.start_dt | format_date }}
Example body snippet
<p>Speaker:
{% for s in speakers %}{{ s.full_name }}{% if not loop.last %}, {% endif %}{% endfor %}
</p>
{% if abstract %}<p>{{ abstract }}</p>{% endif %}
How Reminders Are Dispatched
A Celery periodic task (send_category_reminders) runs every hour. For each active rule it:
- Queries all upcoming events in the linked category (within the next 30 days).
- For each event, checks whether:
- The advance reminder should fire today (event is exactly
days_beforedays away) at the configured UTC hour. - The day-of reminder should fire today (event starts today) at the configured UTC hour.
- The advance reminder should fire today (event is exactly
- Skips events for which a reminder of that type has already been sent.
- Renders the Jinja2 templates and dispatches the email via Indico's standard email system.
- Records the send in the
sent_reminderstable.
Database Schema
Two tables are created in the plugin_category_reminder PostgreSQL schema:
category_reminder_configs– one row per reminder rulesent_reminders– one row per (config, event, type) combination; prevents duplicates
Development & Testing
git clone https://git.aquila-consortium.org/guilhem_lavaux/indico-plugin-reminder
cd indico-plugin-category-reminder
pip install -e ".[dev]"
pytest
Troubleshooting
| Issue | Symptom | Fix |
|---|---|---|
| No emails are sent | Celery worker not running | Start the worker: celery -A indico.app.celery worker --loglevel=info |
| Templates render incorrectly | Jinja2 syntax errors | Validate templates in the preview pane before saving |
| Duplicate emails | sent_reminders table not updated |
Ensure the migration has run and the table exists |
| Plugin not visible | Plugin not listed in Admin → Plugins | Verify indico-plugin-category-reminder is installed in the same environment as Indico |
Contribution Guide
- Fork the repository and create a feature branch:
git checkout -b my-feature. - Make your changes and run tests:
pytest. - Ensure code style passes:
flake8 .. - Commit with a clear message and push:
git push origin my-feature. - Open a pull request against the
mainbranch and reference any relevant issue.
We welcome all contributions! For major changes, please open an issue first to discuss the approach.
License
MIT