derekantrican / GAS-ICS-Sync

A Google Apps Script for syncing ICS/ICAL files faster than the current Google Calendar speed
GNU General Public License v3.0
1.54k stars 197 forks source link

[Request] Event filters #422

Closed pauel3312 closed 5 months ago

pauel3312 commented 7 months ago

Is your feature request related to a problem? Please describe.

The calendar I clone creates events for canceled events, and the name of such events starts with CANCELLED. Also, during the holidays, there is an event that has no title or just -, I'm not sure if that just means the event has no title or if it is the actual title), that is created from midnight to midnight, but that is not an all day event. I guess these are problems with the calendar provider, but I think something can be done on the script's side, and it can just be a good feature.

Describe the solution you'd like

To fix this, I think what might be useful to have filters for events: name based, date based, weekday based (as suggested in #359 ), etc... This would allow me to solve my issue, and it would make the script overall more convenient.

Additional context

No response

jonas0b1011001 commented 7 months ago

Check out this branch, it allows to define various filters in filters.gs.

pauel3312 commented 7 months ago

Check out this branch, it allows to define various filters in filters.gs.

Okay this is awesome, I could remove cancelled events I have two questions however: I could not find a way to remove all event that (it turns out) had no title. I tried ^$ in regex mode, didn't work (also tried empty string, removed everything, but I should have known, that's on me). How can I do this?
Also, why is there no open PR for this? Edit: tried an empty string in equals mode, didn't work either. Edit2: I figured it out: it's because in the script, it is in fact not an empty string, but a white space.

jonas0b1011001 commented 7 months ago

So you have it fully working now?

Also, why is there no open PR for this?

Because i actually intend to further work on it and do some testing, but have not had time to fully commit to it.

pauel3312 commented 7 months ago

So you have it fully working now?

Yup, works beautifully.

I don't know what might help, but if you want me to write a readme/user manual for this, I'll gladly help, but I don't really know the script itself. I mean I could figure out how to use log debugging to get the exact value of the summary of the events it would not delete, but that's about it, but I understand how it works mostly.

Edit:corrected a formatting mistake.

ArkadiuszNiemiec commented 7 months ago

Unfortunately it does not work correctly with one occurrence cancelled by the series author. The cancelled occurrence is not being deleted and while starting the sync the cancelled meeting is not changing to Free from Tentative until I remove the filter.

jonas0b1011001 commented 7 months ago

Unfortunately it does not work correctly with one occurrence cancelled by the series author. The cancelled occurrence is not being deleted and while starting the sync the cancelled meeting is not changing to Free from Tentative until I remove the filter.

With occurrence you mean a single event from a recurrence series? What filter did you define? Can you share that calendar?

ArkadiuszNiemiec commented 7 months ago

Yes, sure. How can I contact you directly?

jonas0b1011001 commented 7 months ago

Yes, sure. How can I contact you directly?

You can join the discord or send me an email.

ArkadiuszNiemiec commented 7 months ago

Thank you, texted you on Discord. Thanks for the great work!