vit-timetable
v1.7.0
Published
VIT Timetable to Calendar
Downloads
14
Maintainers
Readme
vit-timetable
VIT Timetable to Calendar (NPM package)
Usage/Examples
import { makeGCalTimetable, makeCalendar, parseRawTimetable } from "vit-timetable";
async function GCalEventHandler() {
const text = document.getElementById("text-box").value;
const registrationNumber = document.getElementById("r-number").value;
const arrayOfCourses = parseRawTimetable(text,registrationNumber);
await makeGCalTimetable(arrayOfCourses);
}
function ICSEventHandler() {
const text = document.getElementById("text-box").value;
const arrayOfCourses = parseRawTimetable(text);
const OUTPUT = makeCalendar(arrayOfCourses);
downloadFileWithData(OUTPUT);
}
Contents
Typedefs
parseRawTimetable ⇒ Array.<Course>
Parses raw input text to return Array of Course objects
Kind: global constant
Returns: Array.<Course> - Parsed Array of courses
| Param | Type | Description | | --- | --- | --- | | rawTimetableText | string | Raw timetable text from user input. | | registrationNumber | string | Registration number of student |
makeCalendar ⇒ Object
Make ICS file for Timetable events from Array of courses per student
Kind: global constant Returns: Object - Output
| Param | Type | Default | Description | | --- | --- | --- | --- | | courses | Array.<Course> | | Array of Course objects for all enrolled courses | | [senior] | Boolean | true | Value to note which academic calendar to follow. |
makeGCalTimetable
Automatically handles complete flow from Sign in to Registering Calendar request.
Kind: global constant
| Param | Type | Default | Description | | --- | --- | --- | --- | | parsedParameters | Array.<Course> | | Parsed Array of courses | | [senior] | Boolean | true | Value to note which academic calendar to follow. |
Course : Object
Course object containing all parsed information per course.
Kind: global typedef Properties
| Name | Type | Description | | --- | --- | --- | | slots | String | Slots in capital separated by '+' symbol | | courseType | String | Course Types such as ETH, ELA, LO... | | courseName | String | Full Course name | | courseCode | String | Full Course Code | | location | String | Room number of course location | | teacherName | String | Name of main faculty |