This repository contains a Python script to generate .ics
files for calendar events. Specifically, the script creates a series of bi-weekly meetings with a Google Meet link. There are (commented) instructions on how to easily change these default settings. It is designed to work seamlessly within GitHub Codespaces or your local development environment.
An updated versios of create_ics.py
file that accepts input parameters through command-line arguments has also been included, create_ics_argparse.py
.
- Generates an
.ics
file for bi-weekly meetings. - Allows customization of the start date, meeting frequency, and Google Meet link.
- Outputs a calendar file that can be imported into any calendar application.
- Python 3.6+
icalendar
librarypytz
library
If you're using GitHub Codespaces, these requirements will be pre-installed. If you're running the script locally, ensure you have the necessary dependencies installed.
git clone https://github.com/yourusername/ics-generator.git
cd ics-generator
If you don't have the required libraries installed, you can install them using pip:
pip install icalendar pytz
Once the dependencies are installed, you can run the script to generate the .ics
file:
python create_ics.py
This will generate a file named meetings.ics
in the root directory of the project.
python create_ics.py --start_date 2024-08-13 --start_time 09:00 --duration 1 --frequency 2 --end_date 2024-12-31 --meet_link "to-be-provided"
--start_date
: The start date of the first meeting inYYYY-MM-DD
format.--start_time
: The start time of the meeting inHH:MM
format (24-hour).--duration
: Duration of the meeting in hours (default is 1 hour).--frequency
: Frequency of the meetings in weeks (default is 2 weeks).--end_date
: The end date of the series inYYYY-MM-DD
format.--meet_link
: The Google Meet link for the meetings.
This script will generate the meetings.ics
file with all the specified details.
- Go to Google Calendar/Setting
- Choose (Left Pane) Import & Export
- Select file from your computer
- Don't forget to press
Import
You can run this script directly within a GitHub Codespace:
-
Open the repository in GitHub Codespaces.
-
Run the script using the built-in terminal:
python create_ics.py
This will ensure the script works correctly in a cloud environment.
This project is licensed under the MIT License - see the LICENSE file for details.