This year, because of COVID19, the faculty doesn't provide personalized timetables as usually, so I made this simple project that scrapes the official timetable data and then allows you to select the desired lectures and import them to your Google calendar. I also wanted to try out Scrapy and Curses.
git clone https://github.com/nikp00/fri_timetable_to_google_calendar.git
You first need to install all the Python packages.
pip install -r requirements.txt
Then you need to install Curses (it's not included in the requirements.txt, because this step is only necessary on Windows)
pip install windows-curses
You just need to install all the Python packages.
pip3 install -r requirements.txt
You must also provide the Google Auth data.
- Go to https://developers.google.com/calendar/quickstart/python
- Click on Enable the Google Calendar API
- Enter a project name of your choice and click Next
- Select Desktop app and click Create
- Then click DOWNLOAD CLIENT CONFIGURATION
- Save the .json file to the fri_timetable_to_google_calendar
python main <URL TO TIMETABLE>
or python3 main.py <URL TO TIMETABLE
- First you select the subjects that you want to add to your calendar.
- Then you select the lectures/lab work that you want to add. All lectures are selected by default. When you select lab work that has multiple time period options, the non selected ones are grayed out.
- Add to calendar.
When you add lectures to your calendar, their IDs are saved in a .csv file (events_ids.csv) so you can delete the automaticly.
python delete_events.py
or python3 delete_events.py