What It Does
- Polls Moodle for new notifications and forwards them to providers (Discord, Pushbullet, NTFY)
- Optional AI summarization via OpenAI‑compatible endpoints (configurable model/endpoint)
- Lightweight (~50 MB RAM), suitable for 24/7 operation or low-end hardware
Quick Start
- Clone and install:
git clone https://github.com/EvickaStudio/Moodle-Mate
cd Moodle-Mate
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
- Generate config:
python main.py --gen-config
- Run:
python main.py
Docker alternative:
docker compose build
docker compose up -d
Configuration (config.ini)
[moodle]:url,username,password[ai]:enabled,api_key,model,temperature,max_tokens,system_prompt,endpoint[discord]:enabled,webhook_url,bot_name,thumbnail_url[pushbullet]:enabled,api_key[notification]:fetch_interval,max_retries
Use --gen-config to generate and validate this file interactively.
Architecture Overview
- CLI entrypoint (
main.py): parses args, generates config, initializes services, runs main loop - Config loader: singleton that reads
config.iniinto typed sections - Moodle API wrapper: handles login, token/session, and REST calls
- Notification pipeline: fetch newest notification → convert HTML→Markdown → optional LLM TL;DR → send to providers
- Providers: Discord (webhook embed), Pushbullet, with room for custom providers
Processing Workflow
- Fetch newest Moodle popup notification
- Extract subject and HTML message; convert to Markdown
- If AI enabled, call LLM to produce a concise summary
- Send subject/message/optional summary to each enabled provider
Notes
- Supports custom OpenAI‑compatible endpoints (e.g., self‑hosted) for summaries
- Backoff and retries are applied in the main loop; keep
fetch_intervalreasonable
Links
- Repository: github.com/EvickaStudio/Moodle-Mate
- See README for provider setup and advanced configuration