Generates iCal files for class schedules for schools using an N-day cycle

cycle_calendar_generator, calendar, python3, school-stuff
pip install cycle-calendar-generator==1.0.0


Cycle Calendar Generator

PyPI Package Status Travis CI Status Updates Documentation Status Compatible with Python 3.6+

Generates iCal files for class schedules for schools using an N-day cycle

If you're a teacher or a student, you probably have a 6 or 7-day cycle. You'd like to enter your schedule into your calendar, but calendar software doesn't support "recur every n weekdays". So you're out of luck, right? That's where Cycle Calendar Generator comes in. You just need to make an Excel file with your school's schedule, and another Excel file for each teacher/student's schedule, and Cycle Calendar Generator does the rest.


$ pip install cycle_calendar_generator


  1. Make a "Schedule Setup" Excel file
    1. Filename must be schedule_setup.xlsx
    2. Has 3 sheets, named "Period Timing", "Cycle Days List", and "Yearly Schedule"
    3. "Period Timing" sheet gives the period name/number, start time, and end time for each period
    4. "Cycle Days List" sheet lists the name/number of each day in the cycle
    5. "Yearly Schedule" sheet lists all dates in the school year and the matching day in the cycle
    6. Dates and times should be in the standard Excel date/time format
    7. All other data should be in text format, including numbers.
    8. See below for examples
  2. Make an Excel file for each user that wants a schedule calendar
    1. The filename should match the user's name, and will be used to name the output calendar file. (Ex. Eric Idle's Excel file should be named "Eric Idle.xlsx", and will generate "Eric Idle.ics")
    2. Has 1 sheet, named "User Schedule", that has the user's usual schedule for a cycle
    3. All data here should be in text format
    4. See below for examples
  3. Put all files in any folder

  4. Run the application as follows:

    $ cycle_calendar_generator path/to/schedule/files

  5. Schedule iCal files are found in the /output folder under the folder with your input Excel files.


Period Timing

Period Number Start Time End Time
1 8:00 9:00
2 9:00 10:00
3 10:00 11:00
4 11:00 12:00
5 12:00 13:00

Times can be in either 24h or 12h format. "Period Number" should be text format, not number.

Cycle Days List

A1 B2 C3 D4 E5 F6

The entries here are the official names for all cycle days. Every cycle day entry in other sheets must match these values.

Yearly Schedule

Date Cycle Day
8/31/18 A1
9/3/18 B2
9/4/18 C3
9/5/18 D4
9/6/18 E5
9/7/18 F6

Dates can be displayed any way, but must be date format. Entries in the "Cycle Day" column must be an official cycle day as defined in Cycle Days List.

User Schedule

Period Number A1 B2 C3 D4 E5 F6
1 Grade 8   Grade 11     Grade 8
2   Grade 11     Grade 8  
3 Lunch Lunch Lunch Lunch Lunch Lunch
4 Grade 11     Grade 8   Grade 11
5     Grade 8   Grade 11  

"Period Number" should be text format, not number. The "Cycle Days" in the top row must be official cycle days as defined in Cycle Days List


For current Python version:
python3 test
For versions 3.5+

It's recommended to use pyenv to install Python versions required by tox. pyenv can be installed using Homebrew:

brew update
brew install pyenv
pyenv install 3.6.6 3.7.6


Contributions are always welcome! For thoughts on features or bug reports see Issues. If you're interested in contributing to this library, see details on doing so in the CONTRIBUTING.rst file in this repository.


This package was created with Cookiecutter and the elgertam/cookiecutter-pipenv project template, based on audreyr/cookiecutter-pypackage.

Excel file reading was made possible by the openpyxl package, while iCal file reading and writing uses the ics package.


  • Free software: GNU General Public License v3