-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ics.acmcsuf.com #912
Conversation
✅ Deploy Preview for acmcsuf ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This PR also adds |
13baa7d
to
0b6c8ab
Compare
No idea how anyone used this without installing an LSP before.
This commit adds support for parsing ICS calendars using the ICal standard format in addition to the existing Google Calendar API. The new commit also contains a hard-coded array of ICS calendar links, currently only containing ics.acmcsuf.com. In the future, more links may be added to this. A hard-coded array was chosen over an environment variable because environment variables cannot express arrays as easily. That said, if there are any private calendars, then they can be used as such: const KnownCalendars = [ "public1.ics", "public2.ics", SECRET_ICS_X, SECRET_ICS_Y, ] In the future, if ics.acmcsuf.com is proven to work well enough, the Google Calendar API could even be completely phased out. NOTE: It is worth pointing out that this ICS code currently *does not support recurring events*. This is because ics.acmcsuf.com doesn't do recurring events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I'll look into this soon. This seems to be a reimagining of the ICS parser src/lib/server/events/ical.ts
we maintained before switching to Google Calendar.
Relevant PR: #696
Yes. #646 shouldn't really happen since we have the cache, but also |
Closing this PR, since the team doesn't seem to be interested in merging/reviewing it. |
Apologies for not getting around to posting an official review on this PR. I recall testing this PR locally a while ago and it did not seem to be ready/working. |
What was the error? |
@diamondburned, I don’t recall if there was an error. I actually remember noticing no events were showing despite having events on Discord. I also DM’d you on Discord about this in mid-October. |
You should give it a try again. I think the bot might've left the server randomly, but it's back now. I don't remember you replying to me after sending my messages about it. |
This commit adds support for parsing ICS calendars using the ICal
standard format in addition to the existing Google Calendar API.
The new commit also contains a hard-coded array of ICS calendar links,
currently only containing ics.acmcsuf.com. In the future, more links may
be added to this.
A hard-coded array was chosen over an environment variable because
environment variables cannot express arrays as easily. That said, if
there are any private calendars, then they can be used as such:
In the future, if ics.acmcsuf.com is proven to work well enough, the
Google Calendar API could even be completely phased out.
NOTE: It is worth pointing out that this ICS code currently does not
support recurring events. This is because ics.acmcsuf.com doesn't do
recurring events.