This little script can be run as a cronjob, for example. It converts a CalDAV calendar (found on a specific URL) into an .ics file and uploads this to an FTP server.
The URL can then be fed to Google Calendar. I haven't found another way to regularly sync my CalDAV calendar with Google.
Install the following requirements:
pip install python-dotenv caldav icalendar
Then execute with python main.py
.
Make sure you have a .env
file in the main directory with the following variables:
CALDAV_URI
: The URI of your CalDAV calendarCALDAV_USR
: User name for your CalDAV calendarCALDAV_PWD
: Corresponding passwordFTP_URI
: The URI of your FTP server where the.ics
file will be uploaded toFTP_USR
: The user for the serverFTP_PWD
: Corresponding passwordFTP_PATH
: The actual path to the file you want to store (should end incalendar.ics
)