You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add option to not delete past events #117
* Remove unnessacary variable passed to processEventCleanup
* Fix date comparison
* add check of start.date
* Make ln 644 easier to understand
Copy file name to clipboardExpand all lines: Code.gs
+30-29Lines changed: 30 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
*=========================================
3
3
* INSTALLATION INSTRUCTIONS
4
4
*=========================================
5
-
*
5
+
*
6
6
* 1) Make a copy:
7
7
* New Interface: Go to the project overview icon on the left (looks like this: ⓘ), then click the "copy" icon on the top right (looks like two files on top of each other)
8
8
* Old Interface: Click in the menu "File" > "Make a copy..." and make a copy to your Google Drive
@@ -23,31 +23,32 @@
23
23
24
24
varsourceCalendars=[// The ics/ical urls that you want to get events from along with their target calendars (list a new row for each mapping of ICS url to Google Calendar)
25
25
// For instance: ["https://p24-calendars.icloud.com/holidays/us_en.ics", "US Holidays"]
26
-
// Or with colors following mapping https://developers.google.com/apps-script/reference/calendar/event-color,
26
+
// Or with colors following mapping https://developers.google.com/apps-script/reference/calendar/event-color,
27
27
// for instance: ["https://p24-calendars.icloud.com/holidays/us_en.ics", "US Holidays", "11"]
28
28
["icsUrl1","targetCalendar1"],
29
29
["icsUrl2","targetCalendar2"],
30
30
["icsUrl3","targetCalendar1"]
31
-
31
+
32
32
];
33
33
34
-
varhowFrequent=15;// What interval (minutes) to run this script on to check for new events
35
-
varonlyFutureEvents=false;// If you turn this to "true", past events will not be synced (this will also removed past events from the target calendar if removeEventsFromCalendar is true)
36
-
varaddEventsToCalendar=true;// If you turn this to "false", you can check the log (View > Logs) to make sure your events are being read correctly before turning this on
37
-
varmodifyExistingEvents=true;// If you turn this to "false", any event in the feed that was modified after being added to the calendar will not update
38
-
varremoveEventsFromCalendar=true;// If you turn this to "true", any event created by the script that is not found in the feed will be removed.
39
-
varaddAlerts="yes";// Whether to add the ics/ical alerts as notifications on the Google Calendar events or revert to the calendar's default reminders ("yes", "no", "default").
40
-
varaddOrganizerToTitle=false;// Whether to prefix the event name with the event organiser for further clarity
41
-
vardescriptionAsTitles=false;// Whether to use the ics/ical descriptions as titles (true) or to use the normal titles as titles (false)
42
-
varaddCalToTitle=false;// Whether to add the source calendar to title
43
-
varaddAttendees=false;// Whether to add the attendee list. If true, duplicate events will be automatically added to the attendees' calendar.
44
-
vardefaultAllDayReminder=-1;// Default reminder for all day events in minutes before the day of the event (-1 = no reminder, the value has to be between 0 and 40320)
45
-
// See https://github.com/derekantrican/GAS-ICS-Sync/issues/75 for why this is neccessary.
46
-
varoverrideVisibility="";// Changes the visibility of the event ("default", "public", "private", "confidential"). Anything else will revert to the class value of the ICAL event.
34
+
varhowFrequent=15;// What interval (minutes) to run this script on to check for new events
35
+
varonlyFutureEvents=false;// If you turn this to "true", past events will not be synced (this will also removed past events from the target calendar if removeEventsFromCalendar is true)
36
+
varaddEventsToCalendar=true;// If you turn this to "false", you can check the log (View > Logs) to make sure your events are being read correctly before turning this on
37
+
varmodifyExistingEvents=true;// If you turn this to "false", any event in the feed that was modified after being added to the calendar will not update
38
+
varremoveEventsFromCalendar=true;// If you turn this to "true", any event created by the script that is not found in the feed will be removed.
39
+
varremovePastEventsFromCalendar=true;// If you turn this to "false", any event that is in the past will not be removed.
40
+
varaddAlerts="yes";// Whether to add the ics/ical alerts as notifications on the Google Calendar events or revert to the calendar's default reminders ("yes", "no", "default").
41
+
varaddOrganizerToTitle=false;// Whether to prefix the event name with the event organiser for further clarity
42
+
vardescriptionAsTitles=false;// Whether to use the ics/ical descriptions as titles (true) or to use the normal titles as titles (false)
43
+
varaddCalToTitle=false;// Whether to add the source calendar to title
44
+
varaddAttendees=false;// Whether to add the attendee list. If true, duplicate events will be automatically added to the attendees' calendar.
45
+
vardefaultAllDayReminder=-1;// Default reminder for all day events in minutes before the day of the event (-1 = no reminder, the value has to be between 0 and 40320)
46
+
// See https://github.com/derekantrican/GAS-ICS-Sync/issues/75 for why this is neccessary.
47
+
varoverrideVisibility="";// Changes the visibility of the event ("default", "public", "private", "confidential"). Anything else will revert to the class value of the ICAL event.
47
48
varaddTasks=false;
48
49
49
-
varemailSummary=false;// Will email you when an event is added/modified/removed to your calendar
50
-
varemail="";// OPTIONAL: If "emailSummary" is set to true or you want to receive update notifications, you will need to provide your email address
50
+
varemailSummary=false;// Will email you when an event is added/modified/removed to your calendar
51
+
varemail="";// OPTIONAL: If "emailSummary" is set to true or you want to receive update notifications, you will need to provide your email address
51
52
52
53
/*
53
54
*=========================================
@@ -103,7 +104,7 @@ function install(){
103
104
//Schedule sync routine to explicitly repeat and schedule the initial sync
0 commit comments