vit-timetable

1.7.0 • Public • Published

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

parseRawTimetableArray.<Course>

Parses raw input text to return Array of Course objects

makeCalendarObject

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

execute

Function to parse the Array of courses and make the user's Google Calendar

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

Typedefs

Course : Object

Course object containing all parsed information per course.

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

Dependencies (2)

Dev Dependencies (2)

Package Sidebar

Install

npm i vit-timetable

Weekly Downloads

2

Version

1.7.0

License

ISC

Unpacked Size

24.9 kB

Total Files

6

Last publish

Collaborators

  • sankalpmukim