-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Allow alternate calendar name to be prepended to title #366
Comments
If you use #372, it allows you to define an alternate calendar name just like you are looking for (in fact, it is required). Then you will just need to modify the existing addCalToTitle (see below - I put the sourceCalendarName at the end, but you can move it back to the beginning if you want). HOWEVER, a word of warning... #372 works quite differently than the current Master branch. Instead of grouping all source calendars with their corresponding target calendar, this code loops through each source calendar and processes it individually. I'd recommend you delete all calendars entries in your current calendars (you can replace your ics URLs with this empty calendar URL and run it - https://pastebin.com/raw/mEWyU5hV) that were created by GAS-ICS-Sync before you run this the first time. If you don't, it will create duplicate entries (it's because I had to modify the fromGAS part of the code to resolve overwrite conflicts). You can ignore the SyncDelay parts of this if they aren't important to you. if (addCalToTitle && event.hasProperty('parentCal')){ |
I changed to code for myself. It wasn't that much work. Rather then using the array for Optional Arguments in the settings, i would propose using an object for these optional Arguments. ["https://p24-calendars.icloud.com/holidays/us_en.ics", "US Holidays", {
colorId: '1',
calendarName: 'New Name'
}] This change would allow to make future development easier and the settings will be easier to understand. I will clean up my code and make a PR. Even if it wont be used, I think that this could be done similar in a potential refactor #311. |
Is your feature request related to a problem? Please describe.
Instead of prepending the Calendar name to the title of each event (enabled by addCalToTitle), allow us to enter an alternate calendar name in the sourceCalendars array.
For example:
var sourceCalendars = [ ["<some ical URL>", "Test Calendar", "11", "Alternate Calendar Name"] ];
Describe the solution you'd like
Enter a fourth option in the sourceCalendars array for a given ical URL. That fourth option would be prepended to each event that's added to the target calendar from the applicable source calendar.
Additional context
No response
The text was updated successfully, but these errors were encountered: