Python3 script for Scheduling events for Gary, so that no event overlaps and all events are scheduled. The events are scheduled on weekdays between 09:00 and 18:00. hours, and if there's an event that falls outside of these hours they are rescheduled.
-
The script accepts a comma separated string as input.
-
All the events are persisted in a sqlite3 db.
-
The script outputs all the events.
-
Each event is in the following format:
<start_date> -> <end_date> - <event_name>
Ex:
2022/08/23 15:00 -> 2022/08/23 16:00 - Meet Jamie for coffee
Python >= 3.10
- Install poetry
pip install poetry
- Initialise project
poetry init
- Run migrations
pw_migrate migrate --database sqlite:///garendar.db
python scheduler.py "<event_string>"
Example:
python scheduler.py \
"2022/08/27 16:10 -> 2022/08/27 16:40 - Meet Jamie for 30 mins, \
2022/08/27 16:20 -> 2022/08/27 16:27 - Meet Jamie for 7 mins,\
2022/08/27 17:10 -> 2022/08/27 19:40 - Meet Jamie for 2 hr 30 mins,\
2022/08/27 15:10 -> 2022/08/27 15:30 - Meet Jamie for 20 mins"