2.1.1 • Published 5 years ago

untis-mon-to-json v2.1.1

Weekly downloads
1
License
CC-BY-4.0
Repository
gitlab
Last release
5 years ago

untis-mon-to-json

Package for converting untis monitor (html) files into json data

API

readUntisTarGzArchive

An method who provides an easy way to convert a directory structure to a js object.

const untisMonToJson = require("untis-mon-to-json");

untisMonToJson
  .readUntisTarGzArchive("<path>", { encoding: "latin1" })
  .then(({ students, teachers }) => {
    console.table(students);
    console.table(teachers);
  })
  .catch(err => {
    throw err;
  });

The directory structure should be like:

- f1
  - subst_001.htm
  - subst_002.htm
  - subst_003.htm
  - ...
- f2
  - subst_001.htm
  - subst_002.htm
  - subst_003.htm
  - ...
- subst_001.htm
- subst_title.htm

readStudentsFile / readTeachersFile

const untisMonToJson = require("untis-mon-to-json");

untisMonToJson
  .readStudentsFile("<path>", { encoding: "latin1" })
  .then(result => {
    console.table(result);
  })
  .catch(err => {
    throw err;
  });

The students file is one of those in the f2 folder, the teachers one of the f1 folder.

readUntisFile

Exactly like the one above, you have just to provide an order of the headings under the options parameter as "order"

dayStamp

Simply returns an Iso stamp of the given date, just without time.

getNextSchoolDays

Looks for the next days (including the current one) except sundays and saturdays.

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago