karbassi / sync-multiple-google-calendars

Sync Multiple Google Calendars into One

Home Page:https://karbassi.github.io/sync-multiple-google-calendars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preservation of the initial contents

shkurski opened this issue · comments

Hi @karbassi!

Thank you for sharing the script. It seems to be very useful for a use case when there is a need to share cals from multiple accounts as a single cal. A few questions:

  1. I can see that before merging the script removes all events from the destination calendar (not only events merged on a previous iteration). So if there were any events in the destination calendar -- they're lost. Is it intended behavior or I'm doing something wrong?

  2. If (1) is intended, do you have any plans on changing this behavior to preserve initial events in the destination calendar?

  3. If (2) is "yes", would you accept a PR with the fix? It seems straightforward, though I've never done anything around Google Apps before. Do you think there may be any pitfalls?

-- Dmitri

Hello @shkurski,

  1. I can see that before merging the script removes all events from the destination calendar (not only events merged on a previous iteration). So if there were any events in the destination calendar -- they're lost. Is it intended behavior or I'm doing something wrong?

Yes, that's the current intention. It was easier to delete everything and add new events because of Google App Script quotas. The current version uses batch sends/updates, so it shouldn't be much change.

  1. If (1) is intended, do you have any plans on changing this behavior to preserve initial events in the destination calendar?
  2. If (2) is "yes", would you accept a PR with the fix? It seems straightforward, though I've never done anything around Google Apps before. Do you think there may be any pitfalls?

Yes, PRs are welcome and appreciated.