This small script lets you synchronize your lectio.dk schedule with any standard CalDAV server.
This has been developed and tested with Python 3.10
. But it should work with any newer python 3 version.
I recommend using pipenv install
, but you can also install dependencies with pip;
pip install -r requirements.txt
The recommended way to run the script is with the docker image, which will run the script every hour. Please refer to the docker hub repository for more information on how to customize it more. But to simply run the script you can execute the following docker run
command:
docker run -d \
--name lectiocal \
--restart always \
--env-file .env \
dnorhoj/lectiocal:latest
You can also run this script with python, where you can run the script either a single time, with python main.py
, or run the script every hour with python schedule.py
Moreover, you can build and run the repository as a docker image, use heroku, or run it with similar services.
To use the script you need a few environment variables.
LECTIO_INST_ID=123
LECTIO_USERNAME="exam123p"
LECTIO_PASSWORD="eX4mp13"
CALDAV_URL="https://example.com"
CALDAV_USERNAME="[email protected]"
CALDAV_PASSWORD="example"
Optionally, you can set up team translations.
To do this, you can create a file called team_translations.json
in the root,
where you specify your team name translations.
Here you can define case insensitive name as key, which will be searched for, the search is case insensitive and does not need a full match, to succeed.
{
"da": "Dansk",
"ma": "Math",
"en": "Engelsk"
}
This project uses the GNU Lesser General Public License v3.0
license.
You can read more in LICENSE.
If you have any suggestions, bug reports or anything else, you can open an issue, or fix it yourself and open a pull request. :)