Bayclock Schedule Updater

This is a wizard meant to update the Bayclock schedule. This process will probably need to be performed at the beginning of each school year (BEFORE school begins), as well as whenever the school updates their calendar.


Before you start, you will need to download your academic schedule into Google Calendar. If you have already done this step before, you DON'T need to repeat it. Navigate to MyBay (if you are on the MARMOTs google account, switch to your student account), find the black bar on top of the calendar, and press the button on it which looks like a wifi symbol, second from the right. You should see a menu pop up, titled "WebCal Feed for External Calendar". Under the section labeled "My Calendars", click on the text labeled "individual calendar feeds". A list should drop down containing individual calendars for different types of events. Find the blue hyperlink reading "Schedule", right-click on it, and press "Copy Link Address".

Now open Google Calendar. In the left-hand bar, scroll down until you see a section labeled "Other Calendars". Press the "+" button next to it, and select "From URL". Paste the url you just copied into the box, then press "Add Calendar". You may have to wait a bit for the events to appear, but you should see your classes appear as events on your calendar.

It may be worth it to set up email notifications (for this specific calendar) to alert you if the school decides to change the schedule.



If you have your class schedule in Google Calendar, find the appropriate entry in the sidebar on the left (it should look like "webcal://bayscoolsf...."), and press the three dots next to it. Scroll down to the bottom of the page and find the section labeled "Integrate Calendar", then copy the Calendar ID. Press the button below this text and paste in the Calendar ID. If you wish to, you can instead use a custom-made calendar (if the one from MyBay is missing something important, for example). Repeat the same procedure if you wish to do that. The calendar doesn't have to be published.

Now press the button below labeled "Authorize", and sign into your Google account. You will probably see a screen claiming that "Google hasn't verified this app" (because they haven't 😢); click on the gray text in the bottom left labeled "Advanced" and press the link saying "go to __________.github.io". (In general, if you aren't sure that the developer is not malicious, you should NEVER do this; however, I have no intention of taking over your google account :), contact me if you have further security concerns).

You will then be prompted for a "Github API token". This token will be stored in a location which I haven't figured out yet. Don't store this insecurely: anyone with this key can modify all files in the Github repository. Once you have pasted this in, you should be good to go!



Advanced Settings

Update ONLY special schedule

Debugging:

The following things will cause problems with the code:

If weird things are showing up in the JSON schedule files, like sports events for a specific team or grade-specific events, check to make sure that you input the ID of the calendar from MyBay containing ONLY the class schedule, as described above. There are multiple other calendars from MyBay which look quite similar but contain a bunch of things which probably don't need to be on Bayclock

If something doesn't work, or the prompt to give the github API token disappears, it helps to reload the page before trying again

Due to the way the crappy Isomorphic-Git library works, there will always be a single 401 error thrown (it doesn't affect the functionality of the code); if you see more red errors in the console, this could indicate a problem.


Problems? Email bayclock@bayschoolsf.org to report a bug.