1.7.0 • Published 1 year ago

vit-timetable v1.7.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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

ParamTypeDescription
rawTimetableTextstringRaw timetable text from user input.
registrationNumberstringRegistration number of student

makeCalendar ⇒ Object

Make ICS file for Timetable events from Array of courses per student

Kind: global constant Returns: Object - Output

ParamTypeDefaultDescription
coursesArray.<Course>Array of Course objects for all enrolled courses
seniorBooleantrueValue to note which academic calendar to follow.

makeGCalTimetable

Automatically handles complete flow from Sign in to Registering Calendar request.

Kind: global constant

ParamTypeDefaultDescription
parsedParametersArray.<Course>Parsed Array of courses
seniorBooleantrueValue to note which academic calendar to follow.

Course : Object

Course object containing all parsed information per course.

Kind: global typedef Properties

NameTypeDescription
slotsStringSlots in capital separated by '+' symbol
courseTypeStringCourse Types such as ETH, ELA, LO...
courseNameStringFull Course name
courseCodeStringFull Course Code
locationStringRoom number of course location
teacherNameStringName of main faculty
1.7.0

1 year ago

1.6.0

1 year ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.0

3 years ago

1.3.3

3 years ago

1.2.4

3 years ago

1.1.5

3 years ago

1.3.2

3 years ago

1.2.3

3 years ago

1.3.1

3 years ago

1.2.2

3 years ago

1.1.1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago