sitzungsdienst


Namesitzungsdienst JSON
Version 2.3.4 PyPI version JSON
download
home_pagehttps://digitalbuero.eu
SummaryHandles weekly assignment PDFs as exported by "web.sta"
upload_time2022-12-20 14:16:29
maintainerMartin Folkers
docs_urlNone
authorDigitalbüro
requires_python>=3.10,<4.0
licenseGPL-3.0-only
keywords websta legal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sitzungsdienst
[![License](https://badgen.net/badge/license/GPL/blue)](https://codeberg.org/S1SYPHOS/sitzungsdienst/src/branch/main/LICENSE) [![PyPI](https://badgen.net/pypi/v/sitzungsdienst)](https://pypi.org/project/sitzungsdienst) [![Coverage](https://badgen.net/badge/coverage/100/cyan)](https://codeberg.org/S1SYPHOS/sitzungsdienst/src/branch/main/COVERAGE) [![Build](https://ci.codeberg.org/api/badges/S1SYPHOS/sitzungsdienst/status.svg)](https://codeberg.org/S1SYPHOS/sitzungsdienst/issues)

A simple Python utility for working with weekly assignment PDFs as exported by [`web.sta`](https://www.dvhaus.de/leistungen/web.sta).


## Getting started

Simply install all dependencies inside a virtual environment to get started:

```bash
# 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:

```python
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).

```python
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`](https://codeberg.org/S1SYPHOS/sitzungsapp)!


**Happy coding!**

            

Raw data

            {
    "_id": null,
    "home_page": "https://digitalbuero.eu",
    "name": "sitzungsdienst",
    "maintainer": "Martin Folkers",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "hello@twobrain.io",
    "keywords": "websta,legal",
    "author": "Digitalb\u00fcro",
    "author_email": "pypi@digitalbuero.eu",
    "download_url": "https://files.pythonhosted.org/packages/75/51/a6535453ef532c7e5cf11d650d9c480b5209e85b86cf693c537d9f737b43/sitzungsdienst-2.3.4.tar.gz",
    "platform": null,
    "description": "# sitzungsdienst\n[![License](https://badgen.net/badge/license/GPL/blue)](https://codeberg.org/S1SYPHOS/sitzungsdienst/src/branch/main/LICENSE) [![PyPI](https://badgen.net/pypi/v/sitzungsdienst)](https://pypi.org/project/sitzungsdienst) [![Coverage](https://badgen.net/badge/coverage/100/cyan)](https://codeberg.org/S1SYPHOS/sitzungsdienst/src/branch/main/COVERAGE) [![Build](https://ci.codeberg.org/api/badges/S1SYPHOS/sitzungsdienst/status.svg)](https://codeberg.org/S1SYPHOS/sitzungsdienst/issues)\n\nA simple Python utility for working with weekly assignment PDFs as exported by [`web.sta`](https://www.dvhaus.de/leistungen/web.sta).\n\n\n## Getting started\n\nSimply install all dependencies inside a virtual environment to get started:\n\n```bash\n# Clone repository & change directory\ngit clone https://codeberg.org/S1SYPHOS/sitzungsdienst && cd sitzungsdienst\n\n# Set up & activate virtualenv\npoetry shell\n\n# Install dependencies\npoetry install\n```\n\n\n## Usage\n\nUsing this library is straightforward:\n\n```python\nfrom sitzungsdienst import StA\n\n# Pass file path (or its stream) & retrieve data\ncourt_dates, express_dates = StA.runs('path/to/file.pdf')\n\n# You may also pass multiple file paths (or their streams)\ncourt_dates, express_dates = StA.runs(['path/to/file1.pdf', 'path/to/file2.pdf'])\n\n# Use a subset by filtering it\nfiltered_court = court_dates.filter(['alice', 'bob'])\nfiltered_express = express_dates.filter('john')\n\n# Get iCalendar data\nics = filtered_court.data2ics()\nprint(ics)\n\n##\n# BEGIN:VCALENDAR\n# VERSION:2.0\n# ..\n# ..\n```\n\n**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).\n\n```python\nimport asyncio\nfrom sitzungsdienst import StA\n\nasync def main(file):\n    # ..\n\n    return await StA.run(file)\n\n# Retrieve data\ndata = asyncio.gather(*[main(file) for file in files])\n\n# ..\n```\n\nIf you want to see it in action, head over to the [`sitzungsapp`](https://codeberg.org/S1SYPHOS/sitzungsapp)!\n\n\n**Happy coding!**\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Handles weekly assignment PDFs as exported by \"web.sta\"",
    "version": "2.3.4",
    "split_keywords": [
        "websta",
        "legal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b89bea27896f1863b6c5f6186899f5f9",
                "sha256": "4d30e09c4c13e53aa34f1077e73be9643859da0a6bde4c84c08848608232342a"
            },
            "downloads": -1,
            "filename": "sitzungsdienst-2.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b89bea27896f1863b6c5f6186899f5f9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 23710,
            "upload_time": "2022-12-20T14:16:27",
            "upload_time_iso_8601": "2022-12-20T14:16:27.608987Z",
            "url": "https://files.pythonhosted.org/packages/0f/c6/aa3615f152d2c25bd1b0d2dfad7ac2bca6af7f9cf8fc259b7135d7d06f9f/sitzungsdienst-2.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "12aba8e39ac8d4e24410223c546a03d6",
                "sha256": "2943276e54f585142f52bca22daa725ae9e14a5fd1b80a730c09ca83b13a3a59"
            },
            "downloads": -1,
            "filename": "sitzungsdienst-2.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "12aba8e39ac8d4e24410223c546a03d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 22653,
            "upload_time": "2022-12-20T14:16:29",
            "upload_time_iso_8601": "2022-12-20T14:16:29.375486Z",
            "url": "https://files.pythonhosted.org/packages/75/51/a6535453ef532c7e5cf11d650d9c480b5209e85b86cf693c537d9f737b43/sitzungsdienst-2.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-20 14:16:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "sitzungsdienst"
}
        
Elapsed time: 0.02210s