Skip to content

Commit

Permalink
Support reoccurring events.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleiss committed Apr 17, 2022
1 parent 9d7f5da commit 6266379
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Details of the event will be left out - it will only be visible as 'Private even
```
- Run it with `npx -y @cirqusde/google-calendar-sync` (or even better: Add a cronjob to run it repeatedly)

## Known caveats
- Google calendar does not manage event reminders per event but instead manages them per event & user:
Multiple users that attend the same event can have different reminders, and a user can only manage its own reminders.
As the events are created by a service account, the service account can only change its own reminders, not yours.
All events created by the service account will have the default reminders for your calendar set. This might be fine for you with the default settings (10 mins before the event), but you also might want to remove the default reminder within your (work) calendar settings.

## Publish to npm
- Bump version in `package.json`
- Run `npm install`
Expand Down
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const syncCalendar = async (): Promise<{
calendarId: configEntry.sourceCalendar,
timeMin: earliestDate.toISOString(),
timeMax: latestDate.toISOString(),
singleEvents: true,
});
let sourceEvents: calendar_v3.Schema$Event[] = sourceEventsResponse.data.items || [];

Expand All @@ -48,6 +49,7 @@ const syncCalendar = async (): Promise<{
calendarId: configEntry.targetCalendar,
timeMin: earliestDate.toISOString(),
timeMax: latestDate.toISOString(),
singleEvents: true,
});
const targetEvents = targetEventsResponse.data.items;

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cirqusde/google-calendar-sync",
"version": "1.0.1",
"version": "1.0.2",
"repository": "https://github.com/cirqusde/google-calendar-sync",
"description": "Sync events from your private Google Calendar to your work Google calendar.",
"author": "Simon Leiß",
Expand Down

0 comments on commit 6266379

Please sign in to comment.