VULCAN® Optivum® timetable parser library
Project description
VULCAN® Optivum® timetable parser library
This library provides access to public timetables generated using the "Plan lekcji Optivum" software. The resulting dataset is compatible with and based on timetables-lib.
Usage examples
async with OptivumParser() as parser:
# specify an entire timetable
file = File(path="https://www.school.pl/plan/index.html")
# specify a single timetable (class, teacher, classroom)
file = File(path="https://www.school.pl/plan/plany/o3.html")
# specify a local timetable
file = File(path="C:/html/index.html")
# enqueue and parse all (you can specify more files)
ds = await parser.run_all(file)
# enqueue, then parse
parser.enqueue(file)
ds = await parser.run_all()
# sort lessons, because why not
lessons = sorted(ds.lessons, key=lambda x: (x.weekday, x.number))
# print lessons for a specific class
print("\n".join(str(s) for s in lessons if s.register_.name == "1A"))
Command-line scripts
Available after installing the package (if scripts directory is in your PATH
, or you're using a virtualenv).
$ optivum https://www.school.pl/plan/index.html --register 1A
Parsing 'https://www.school.pl/plan/index.html'
Lesson(...)
Lesson(...)
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file timetables-parser-optivum-1.0.0.tar.gz
.
File metadata
- Download URL: timetables-parser-optivum-1.0.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.11.0-1020-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b93972a5fe1851397e3841e85b03b89fe50ffb6dabc39a799bbab1ee312138f |
|
MD5 | 8a155726e04fb5dc0f220ae3e020b4d9 |
|
BLAKE2b-256 | d2b5696addd17cf2d55ebd00ff3b1baf2149cecf9c348e909b64c3b53c1e9b34 |
File details
Details for the file timetables_parser_optivum-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: timetables_parser_optivum-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.11.0-1020-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5075549b3ea06f7fd45aeef3a09e0856cff58fed26488f4ecf687d6977cde927 |
|
MD5 | 53ebfc18c4ca9c2ca2f75bb62be620d7 |
|
BLAKE2b-256 | 485d003fc2373bd3eaed6e61a3984846df6a2ca0cfe7e89c857d8b76bec402b2 |