1.6.0 • Published 9 months ago

@wulkanowy/timetable-parser v1.6.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 months ago

license stars npm

VULCAN Optivum Timetable parser for JS

Based on wulkanowy/timetable-parser-php (not 1:1 copy)

Installation

Via NPM

$ npm install @wulkanowy/timetable-parser

Usage

Parsing Timetable Index Page

import { Timetable } from '@wulkanowy/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 '@wulkanowy/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 '@wulkanowy/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()
1.6.0

9 months ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.5

5 years ago