This repository contains a Python script that reads calendar events from a CSV file and generates an ICS file for importing into your favorite calendar application.
- Converts calendar events from CSV to ICS format
- Supports all-day events
- Logs the conversion process
- Docker & docker compose OR
- Anaconda/Conda/Miniconda OR
- Python 3.x with package python-dateutil
The app/source.csv
file has the following columns:
DTSTART
: Start date and time of the event (for an all-day event, do not include a time)DTEND
: End date and time of the event (leave blank for an all-day event)DESCRIPTION
: Description of the event. If the description includes commas, the description field should be in quotations.SUMMARY
: Summary or heading of the event
A spreadsheet application can be used to generate the app/sources.csv
file.
- Clone the repository:
git clone https://github.com/devincorey/ical-generator.git cd ical-generator
- Build and run the Docker container:
docker compose up --build
- After the script completes, the generated
calendar.ics
file andlog.txt
file will be in the output folder.
- Clone the repository:
git clone https://github.com/devincorey/ical-generator.git cd ical-generator
- Create a conda environment from the
.yml
fileconda env create --file conda/environment.yml
- Activate the conda environment:
conda activate py310_icsgenerator
- Run the Python script:
cd app python script.py
- After the script completes, the generated
calendar.ics
file andlog.txt
file will be in the output folder.
To delete the Docker image and container, run:
docker-compose down docker rmi ics-generator-python
To remove the conda environment after running the project:
conda remove --name py310_icsgenerator --all
Please feel free reach out with any comments, questions or issues. I've tested this on MacOS with Apple Calendar.