1.4 KiB
1.4 KiB
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_HOSTEMAIL_FROMEMAIL_TO
Recommended settings:
ALMA_CREDS_FILE=/config/alma.credsALMA_ASSIGNMENTS_URL=https://example.invalid/children/student-id/assignmentsALMA_SCHEDULE_URL=https://example.invalid/children/student-id/scheduleALMA_START_DATE=2026-01-20ALMA_UPCOMING_DAYS=14SMTP_PORT=587SMTP_STARTTLS=trueSMTP_USERNAMESMTP_PASSWORDPRINT_REPORT=trueSEND_EMAIL=false
Any setting can also be supplied via a *_FILE variant such as SMTP_PASSWORD_FILE.
The Alma credentials file format is:
username: your-alma-username
password: your-alma-password
Local run
go test ./...
PRINT_REPORT=true SEND_EMAIL=false ALMA_CREDS_FILE=/path/to/alma.creds go run .
Container
Build:
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.