Skip to content

odin568/spielerplus-calendar

 
 

Repository files navigation

spielerplus-calendar

Get your Spielerplus events in ICS format for calendar subscription.

CI Build Docker Docker Image)

Setup

  • vscode
  • pyenv
  • python 3.10
  • poetry
  • docker

Tools

  • black
  • pytest
  • pylint
  • mypy

Configuration

The application has to be configured with a config.json file. For an example see tests/data/config.json

  • server: base URL of the Spielerplus server e.g. https://www.spielerplus.de.
  • team[].identity: your personal _identity cookie on the Spielerplus server for the respective team. You can access the cookie value from the the browser settings or DevTools (e.g. Firefox or Chrome). ⚠️ Copying from Browser DevTools or pasting into an IDE might mix up the encoding. The value has to be encodet just at the inline double quotes to be a valid json string value. For an example see tests/data/config.json.
  • team[].name: can be chosen freely, as it is only used for naming the calendar.

Development Flask Server

Start a development server:
poetry run flask --app spielerplus_calendar/server.py --debug run

The server is reachable under http://localhost:5000 (flask default).

Endpoints (spielerplus-calendar/server.py):

  • /team/<team_id> serves all Events of the team
  • /personal/<team_id> serves only Events attend

CLI

Generates ICS output for custom postprocessing:
poetry run python spielerplus_calendar/main.py

Production Docker Image

Starts a production ready server in a docker container:
docker run -p 5000:5000 -v $(pwd)/config.json:/app/config.json:ro djbrown/spielerplus-calendar The server will be reachable under port 5000 on all public ip addresses of your machine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 94.8%
  • Python 5.0%
  • Dockerfile 0.2%