This repository contains a script to convert a CSV file with event details into an ICS file.
- Python 3.7 or higher
pandas
libraryicalendar
librarypytz
library
-
Create and activate a new Conda environment:
conda create --name calendar_env python=3.7 conda activate calendar_env
-
Install the required packages:
conda install -c conda-forge pandas pytz pip install icalendar
-
Prepare your CSV file with the following headers:
Subject
Start Date
Start Time
End Date
End Time
All Day
Description
Location
-
Run the script:
python csv_to_ics.py input.csv output.ics --timezone 'US/Eastern'
Replace
input.csv
with the path to your CSV file andoutput.ics
with the desired path for the ICS file. The time zone is set to 'US/Eastern' by default.
An example CSV file (test_data.csv
) is provided in this repository. You can use it to test the script:
python csv_to_ics.py test_data.csv output.ics --timezone 'US/Eastern'