Message scraper from crappy Librus Synergia gradebook. Forwards every new message from a given folder to an e-mail.
- Make sure you have installed
git
,virtualenv
andpython3
- Checkout pylibrus repository and run
install.sh
script - Setup parameters in
check_librus.sh
(path provided ininstall.sh
output) - Setup cron entry to run script periodically (details in
install.sh
output)
Parameters are passed through environment:
DB_NAME
- file with SQLite database of sent messagesLIBRUS_USER
- login to LibrusLIBRUS_PASS
- password to LibrusSMTP_USER
- login toSMTP_SERVER
(also the originator of the e-mail sent)SMTP_PASS
- password toSMTP_SERVER
SMTP_SERVER
- SMTP server address (e.g.smtp.gmail.com
)EMAIL_DEST
- destination to send e-mail, may be many e-mails separated by,
Example shell script to run in loop, to be launched from tmux
or screen
:
#!/bin/bash
source venv/bin/activate
set -xeuo pipefail
export LIBRUS_USER=...
export LIBRUS_PASS=...
export SMTP_USER=...
export SMTP_PASS=...
export SMTP_SERVER=...
export EMAIL_DEST=...
while true; do
python pylibrus.py
sleep 600
done
WARNING: only GMail SMTP server was tested.
- support HTML messages
- support announcements
- support calendar