This has been a fork of https://gitlab.com/iexos/caldav2telegram but can be seen as a standalone project by now.
This script does several things (most of them optional) interacting with Nextcloud Calendars via caldav:
- Get Events submitted through a Form and automatically add them to a calendar
- Fetch all the Events from multiple Calendars, locate those Events on Openstreetmap using Nominatim and store the information in a database
- Sync Changes regularly (through cron jobs) to keep the database up to date with the CalDav backend
- Display Events in a nice Web-App with a Map and List View with lots of filters
- Add an "About" Page to the Web-App
- Add a "Links" Page to the Web-App
- Write a Message listing the Events in MarkDown, HTML, or Plain Text.
- Send the message via Mail in HTML/Plaintext.
- Post the message to a Telegram channel in MarkDown
- Write the Message to StdOut in Plain Text
- Form for submitting events to the Caldav backend
- Moderation tool for the caldav backend
- Api
- Automated Message to Signal
- Personalized newsletter
- Search feature
See TODO.md for more information.
This is a Work in Progress, it should be installable via pip in the future.
git clone https://github.com/whoamiafterall/bewegungskalender2telegram.git <directory>cd <directory>python3.11 -m venv .venv# Should be python3.10 or highersource <directory>/bin/activatepip3 install --upgrade pippip install poetrypoetry installnano config.yml# Edit Config and change it to your needscp credentials.example.yml credentials.yml && nano credentials.yml# Copy Credentials file and add your credentials
For the telegram output, you will need to setup a telegram bot:
- get a token first, see the Telegram documentation
- insert the token into your config file
- invite the bot into a channel or group
- run with
--get-telegram-updatesflag to get the id of that channel/group - you may get the update for being added to a channel only once! If you miss it, remove the bot from that channel and add it again
- insert the correct
channel_idinto your config file
See the help information with this command:
python3 -m bewegungskalender.main
You need to either run with -db full to fetch and store all events existing in your calendars, or -db search with -qe and -qs to search for events in a given timeframe (defaults to next 14 days)
To make it post regular updates with Events, schedule -n or -t via cron or similar.
There are plans to make this more comprehensible and easier with typer, but we're not there yet.