- I missed graded LMS/NPTEL deadlines and didn’t want to lose marks again. So I automated the boring parts: fetch deadlines daily, read the relevant email announcements, and push everything to Google Calendar with reminders.
- Scrapes LMS calendar to collect upcoming deadlines.
- Reads Gmail for NPTEL course announcements and extracts one “Assignment” and one “Programming Assignment” with their due dates.
- Normalizes dates and pushes events to Google Calendar (scheduled the day before due, IST).
- Sends reminder emails at specific times (07:00, 12:00, 18:00, 20:00, 22:00 IST).
- Runs on a schedule with GitHub Actions (no local machine required).
retrieval.py: Logs into LMS and scrapes calendar events and due dates.email_parser.py: Uses Gmail API to fetch today’s NPTEL emails, cleans HTML to text, extracts assignment names and deadlines, and formats them for calendar.push_deadlines.py: Combines LMS + email deadlines and creates Google Calendar events.send_reminders.py: Sends reminder emails when deadlines are tomorrow..github/workflows/remindly.yml: Runs the job on a cron schedule and on-demand.
- Python 3.12 recommended
- Install deps
pip install -r requirements.txt- Google OAuth files in
Remindly/client_secret.json(from Google Cloud → OAuth client)token.json(created on first run)
- Environment variables in
.env(gitignored)
LMS_USERNAME=...
LMS_PASSWORD=...
SENDER_EMAIL=...
APP_PASSWORD=... # Gmail App Password
RECEIVER_EMAIL=...- First run and auth
- Run
push_deadlines.pyonce to trigger OAuth - Approve scopes: Gmail modify + Calendar
token.jsonis generated with arefresh_token(stored locally; copy into GitHub Secret below)
- Run
- Add these Repository Secrets (Settings → Secrets and variables → Actions):
CLIENT_SECRET_JSON: full contents ofclient_secret.jsonGMAIL_TOKEN_JSON: full contents oftoken.json(must includerefresh_token)LMS_USERNAME,LMS_PASSWORDSENDER_EMAIL,APP_PASSWORD,RECEIVER_EMAIL
- Ensure workflow exists at
.github/workflows/remindly.ymland is on the default branch. - Cron schedule (UTC) triggers at your IST times; workflow also supports manual “Run workflow”.
- Local (manual):
python push_deadlines.py
python send_reminders.py- GitHub Actions: configured to run at chosen IST hours; installs deps, writes secrets, and executes the scripts.
- Keep
client_secret.jsonandtoken.jsonout of the repo; store them in GitHub Secrets. - If you change scopes, delete
token.jsonlocally, re-auth once, and update theGMAIL_TOKEN_JSONsecret. - Email parsing is tuned for NPTEL announcement style; adjust regex patterns in
email_parser.pyif formats change.