Skip to content
/ ntu-ical Public

Python script to parse data from 'Check/Print Courses Registered' to ICS

License

Notifications You must be signed in to change notification settings

reown/ntu-ical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

220 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTUiCal

Python script to parse data from 'Check/Print Courses Registered' to ICS

Branch Structure

  • main → stable branch for local use
  • feature-fes → flask experiments
  • prod-heroku-outdated → Heroku shuts down free tier
  • prod-render → deployed to Render

File Structure

  • server.py → production server
  • vibe.py → generate .ics from course data
  • groove.py → converts .ics to .json for calendar view
  • scrap.py → prepare HTML data before passing to vibe.py

Input Data Required

Usage

1. Using the Deployed Site

  • Select date of semester's first day
    Example
    Monday of Week 1
  • Upload your course data
    • Option 1: Upload the .html file [Recommended]
      Example
      Right Click → Save Page As
    • Option 2: Paste course table data
      Example
      Only copy the contents within the red box
  • Click Parse to preview VEVENTs
  • Click Download to obtain the .ics file

OR

2. Running the vibe.py Script Locally

  • Clone the repository

    git clone https://github.com/reown/ntu-ical.git
    
    cd ntu-ical
    
  • Save your Check/Print Courses Registered data as

    • a .html file or
    • copied to a .txt file
    Example See samplehtml
    or sampletxt
  • Install dependencies

    pip install -r requirements.txt
    
  • Run the script (requires 2 arguements)

    python fes/vibe.py <filePath> <DDMMYYYY>
    
    • <filePath>: path to your .html or .txt file
    • <DDMMYYYY>: date of semester's first day (eg., 09082021)
  • The .ics file will be saved in the same directory with the same name as your input file

Supported Cases

  • Exempted Modules
  • Online Modules
  • Recess Week
  • Saturday Classes
  • Merged rows (Empty Course/Title)
  • Missing Laboratory Codes (Engineering only?)
  • 'Asynchronous online learning' Remark
  • HTML from STARS
  • Exam Schedule

About

Python script to parse data from 'Check/Print Courses Registered' to ICS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published