The purpose of this project is to create a program that can use the Python iCalendar library to take simple data fed into it and export an iCalendar file that is ready to be imported into a calendar client. I wanted to be able to take the academic calendar my university has published on their website and add the events into my calendar app(s) of choice, helping me to organize and identify my schedule, especially in regard to breaks and exams. Last year, I entered the events manually into an Excel sheet and got them into my calendar by running it through various different programs. I wanted to automate this, as manually entering and running files through multiple programs is not simple, streamlined, or practical, especially for a large number of events.
I also wanted to do a few more projects that had an emphasis on object-oriented design, which I did not have in any of my existing published projects. The cal_generator.py file contains the classes that process entered data into an exported .ics file, ready for import. Currently, the program supports three type of events:
- Standard All-Day Events: Events that last one day and are marked as "All-Day" by most calendar clients. Contains date and description.
- Time Events: Events within one day with a start and end time. Requires timezone input. Contains date, start/end times, and description.
- Multi-Day Events: Events that have a start date and an end date. No time. Contains start/end dates and description.
The test.py file demonstates the backend works. It creates three events, one of each type, and generates a single file containing all of them. The one day event is classified as such by Apple Calendar. The time event, entered in with the timezone of Indianapolis (Eastern), was imported with that classification, allowing it to be easily converted to the user's current timezone. The screenshot was taken on a device in Chicago's timezone (Central), and the event's time was automatically changed within the calendar client to reflect that. The multi-day events span over the specified dates without issue.