GAS-ICS-Sync icon indicating copy to clipboard operation
GAS-ICS-Sync copied to clipboard

[Request] Event filters

Open pauel3312 opened this issue 11 months ago • 9 comments

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

pauel3312 avatar Mar 14 '24 08:03 pauel3312

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

jonas0b1011001 avatar Mar 14 '24 09:03 jonas0b1011001

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.

pauel3312 avatar Mar 14 '24 11:03 pauel3312

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.

jonas0b1011001 avatar Mar 14 '24 19:03 jonas0b1011001

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.

pauel3312 avatar Mar 14 '24 23:03 pauel3312

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.

ArkadiuszNiemiec avatar Mar 19 '24 23:03 ArkadiuszNiemiec

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?

jonas0b1011001 avatar Mar 19 '24 23:03 jonas0b1011001

Yes, sure. How can I contact you directly?

ArkadiuszNiemiec avatar Mar 19 '24 23:03 ArkadiuszNiemiec

Yes, sure. How can I contact you directly?

You can join the discord or send me an email.

jonas0b1011001 avatar Mar 19 '24 23:03 jonas0b1011001

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

ArkadiuszNiemiec avatar Mar 20 '24 00:03 ArkadiuszNiemiec