No description
Find a file
2024-11-17 21:26:40 +01:00
csv-to-ics.py adjusted code to match CryptPad file format 2024-11-17 21:26:40 +01:00
README.md updated README 2024-11-17 20:13:13 +01:00
requirements.txt added documentation and requirements.txt 2024-11-17 09:31:30 +01:00

Generate ICS from CSV

This script generates an ICS file containing events converted from a CSV file.

You'll need to install two python modules:

pip install -r requirements.txt

calling the script will prompt for the CSV file. The output will be two files. One is the CSV file with the .ics extension, the other is a event_uids.json containing the unique identifier of each event line. This will make updating the events via the CSV file easier.

Key Features:

  • UID Persistence: Event UIDs are stored in a JSON file (event_uids.json). If the event key (based on description, date, start time, and location) exists, the same UID is reused.
  • LAST-MODIFIED Field: The last_modified timestamp is added to each event, ensuring updates are detected by calendar applications.
  • Resilience to Changes: If an event's details are modified in the CSV, the application recognizes it as an update due to the persistent UID.

Benefits:

Consistent Updates: Calendar applications update events with matching UIDs rather than creating duplicates. Persistence: Even if the script is rerun, previously assigned UIDs remain consistent.

example CSV file format

Gastgeber;Description;Date;start time;end time;Location
Max Müller;Team Meeting;20.11.2024;10:00;11:00;Berlin
Anna Löwe;Project Kickoff;21.11.2024;09:00;10:30;München

Example ICS output

BEGIN:VEVENT
DTSTART;TZID=Europe/Berlin:20241120T100000
DTEND;TZID=Europe/Berlin:20241120T110000
SUMMARY:Team Meeting (Host: Max Müller)
LOCATION:Berlin
END:VEVENT