Skip to content

itzkrofi/timetable-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@itzkrofi/timetable-parser

Installation

PNPM (or any package manager)

pnpm add @itzkrofi/timetable-parser

Usage/Examples

Parsing timetable index page

import { Timetable } from "@itzkrofi/timetable-parser";

const timetable = new Timetable(/*Content of index.html file*/);

// Returns: String containing title of the timetable
const title = timetable.getTitle();

// Returns: String containing path to lista.html file
const list = timetable.getListPath();

Parsing Timetable List

import { TimetableList } from "@itzkrofi/timetable-parser";

const timetableList = new TimetableList(/*Content of lista.html file*/);

// Returns: Object of 3 lists
const list = timetableList.getList();

// Returns: String containing path to school logo
const logo = timetableList.getLogoSrc();

Parsing Table

import { Table } from "@itzkrofi/timetable-parser";

const table = new Table(/*Content of plany/XYY.html file*/);

// Returns: String containing title of the timetable
const title = table.getTitle();

// Returns: Array of days from timetable headers
const dayNames = table.getDayNames();

// Returns: Object of hours
const hours = table.getHours();

// Returns: Array of lessons sorted by lesson number
const rawDays = table.getRawDays();

// Returns: Array of lessons sorted by days
const days = table.getDays();

// Returns: String containing timetable generation date
const generated = title.getGeneratedDate();

// Returns: String containing timetable effective date
const generated = title.getVersionInfo();

About

A Vulcan Optivum timetable parser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors