Git Product home page Git Product logo

sit-timetable-to-google-calendar's Introduction

Problem Statement

Manually extract the timetable as HTML from the IN4SIT webpage and parse it into a csv. The file generated should be a .csv which can be imported into Google Calendar.

Important Note!

There are constant updates and changes to the timetable. Import the csv file into a NEW CALENDAR. Updating it is as simple as deleting the old calendar and re-importing the updated csv.

How to use

  1. Install python lmao
  2. Download convert.py and create a 'source.txt' file in the same directory
  3. Log into IN4SIT
  4. Open the shortcut in the same browser
  5. Open Inspect Element (CTRL + SHIFT + I)
  6. Copy the <body> and paste it in 'source.txt'
  7. Double click 'run.bat'
  8. Import 'output.csv' into Google Calendar

How it works

  1. Magic
  2. Clean up all the useless HTML tags and keeps the important bits (run spellchecks here as well)
  3. Split data by course, then do further cleaning to remove headers and labels
  4. Extract important info into their own global variables
  5. Use the variables to construct a calendar event (in .csv format)
  6. Merge all the lists and output as a .csv file

Alternatives (but they didn't work for me lolz)

SIT Timetable Grabber

Timetable Grabber - SIT

Credits

I made it. Thanks to Google and stackoverflow for answering my questions. No thanks to the school for not having an option to export as CSV/ICS.


dev notes pls ignore

CSV Headers

! Remember: Surround data with " if it has commas

Subject,Start Date,Start Time,End Date,End Time,All Day Event,Description,Location,Private

Final exam,05/30/2020,10:00 AM,05/30/2020,1:00 PM,False,50 multiple choice questions and two essay questions,"Columbia, Schermerhorn 614",True

data reference

<course_info> // breaks down into <course_id> - <name_of_course>

// can just ignore, it's all probably enrolled // number up to 2dp for some reason // graded or pass/fail

// at the start of each component <Class_Nbr> // unique id for the class

// `ALL` or a letter-number pair like `P4`, L-Lecture / P-Laboratory / W-Workshop // Lecture/Laboratory/Workshop

// repeats <Days_and_Times> // time of the class // usually the same, Online or room id in the form of -<room_id> like SP-SR2E // name of instructor in full caps, trailing . to clean up <Start/End_Date> // formatted as DD/MM/YYYY - DD/MM/YYYY

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.