# Alma Assignments Reporter This service logs into Alma, reads the `Missing / Revise` assignments table, walks the schedule page to find each class, collects upcoming assignments from each class page, and emails a daily report. ## Configuration Required when `SEND_EMAIL=true`: - `SMTP_HOST` - `EMAIL_FROM` - `EMAIL_TO` Recommended settings: - `ALMA_CREDS_FILE=/config/alma.creds` - `ALMA_ASSIGNMENTS_URL=https://example.invalid/children/student-id/assignments` - `ALMA_SCHEDULE_URL=https://example.invalid/children/student-id/schedule` - `ALMA_START_DATE=2026-01-20` - `ALMA_UPCOMING_DAYS=14` - `SMTP_PORT=587` - `SMTP_STARTTLS=true` - `SMTP_USERNAME` - `SMTP_PASSWORD` - `PRINT_REPORT=true` - `SEND_EMAIL=false` Any setting can also be supplied via a `*_FILE` variant such as `SMTP_PASSWORD_FILE`. The Alma credentials file format is: ```yaml username: your-alma-username password: your-alma-password ``` ## Local run ```bash go test ./... PRINT_REPORT=true SEND_EMAIL=false ALMA_CREDS_FILE=/path/to/alma.creds go run . ``` ## Container Build: ```bash docker build -t example.invalid/alma-assignments-reporter:latest . ``` The container image uses a static Go binary in `scratch`, with only the CA bundle copied in for HTTPS and SMTP TLS. ## Kubernetes Use a Secret for Alma and SMTP credentials. The example manifest in `cronjob.example.yaml` mounts Alma credentials at `/config/alma.creds` and reads SMTP credentials from secret-backed environment variables.