Handles weekly assignment PDFs as exported by "web.sta"
Project description
sitzungsdienst
A simple Python utility for working with weekly assignment PDFs as exported by web.sta.
Getting started
Simply install all dependencies inside a virtual environment to get started:
# Clone repository & change directory
git clone https://codeberg.org/S1SYPHOS/sitzungsdienst && cd sitzungsdienst
# Set up & activate virtualenv
poetry shell
# Install dependencies
poetry install
Usage
Using this library is straightforward:
from sitzungsdienst import StA
# Pass file path (or its stream) & retrieve data
court_dates, express_dates = StA.runs('path/to/file.pdf')
# You may also pass multiple file paths (or their streams)
court_dates, express_dates = StA.runs(['path/to/file1.pdf', 'path/to/file2.pdf'])
# Use a subset by filtering it
filtered_court = court_dates.filter(['alice', 'bob'])
filtered_express = express_dates.filter('john')
# Get iCalendar data
ics = filtered_court.data2ics()
print(ics)
##
# BEGIN:VCALENDAR
# VERSION:2.0
# ..
# ..
Note: Since all data methods are using async, you should either await them (inside your own asyncio context) or call them using asyncio.run() (see below).
import asyncio
from sitzungsdienst import StA
async def main(file):
# ..
return await StA.run(file)
# Retrieve data
data = asyncio.gather(*[main(file) for file in files])
# ..
If you want to see it in action, head over to the sitzungsapp!
Happy coding!
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sitzungsdienst-2.3.4.tar.gz.
File metadata
- Download URL: sitzungsdienst-2.3.4.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.4 Linux/5.19.0-76051900-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2943276e54f585142f52bca22daa725ae9e14a5fd1b80a730c09ca83b13a3a59
|
|
| MD5 |
12aba8e39ac8d4e24410223c546a03d6
|
|
| BLAKE2b-256 |
7551a6535453ef532c7e5cf11d650d9c480b5209e85b86cf693c537d9f737b43
|
File details
Details for the file sitzungsdienst-2.3.4-py3-none-any.whl.
File metadata
- Download URL: sitzungsdienst-2.3.4-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.4 Linux/5.19.0-76051900-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d30e09c4c13e53aa34f1077e73be9643859da0a6bde4c84c08848608232342a
|
|
| MD5 |
b89bea27896f1863b6c5f6186899f5f9
|
|
| BLAKE2b-256 |
0fc6aa3615f152d2c25bd1b0d2dfad7ac2bca6af7f9cf8fc259b7135d7d06f9f
|