Most of the app is done now, just need to fix some crazy edge cases, like right now, it doesn’t work if there is an event that is 2 weeks long, and cross year as well. I also need to test if the Github gist script actually works.
So here’s the flow right now:
One time setup:
- You run the
save-session.js script, it will open a browser window
- Login to your school account
- Press enter in the terminal, the script will then save the cookies of the browser session so that it can use that to get calendar data later.
I will put more details about why I chose this methodology later in the Github readme.
ㅤ
To generate the *.ics file:
- You run the
fetch-ics.js script and wait patiently. If you set the MONTHS_TO_WALK constant in the file to a fairly big number, it can take a while.
- The script will go through each page of the “Public URL of the Calendar” (not very public) and webscrape each event that is there. Since it is using your credentials from the One time setup, it will get all of the events, not just the public ones.
- Done! Now you have a
classroom.ics file that you can do whatever you want with!