week-planner-card icon indicating copy to clipboard operation
week-planner-card copied to clipboard

Filtering Events

Open maranhaoBruno opened this issue 1 year ago • 1 comments

Is there a way to filter events in or out so that they do or don’t appear in the calendar? I subscribe to some work and school (my kids) calendars that I don’t control, and I would like to restrict the number of events that appear on my calendar as not all of the events posted in the public calendar are pertinent to myself or my family?

thanks, B

maranhaoBruno avatar Jun 04 '24 10:06 maranhaoBruno

Likewise, my Google Calendars are bringing in my working location -- would love to be able to ignore any event that matches a certain regex.

doctorkb avatar Jun 12 '24 21:06 doctorkb

I would like to request this as well. My wife is a fitness instructor and she has a calendar that lists who is teaching, but I would only want it to be listed on our calendar if she is teaching. Or only bring in events from my work calendar if the subject contains "Company Holiday" or similar.

broyuken avatar Aug 28 '24 13:08 broyuken

This has been added to the dev branch and will be included in the 1.7.0 release.

FamousWolf avatar Sep 01 '24 15:09 FamousWolf

You can use the filter configuration to define a regular expression. Any event title that matches the regular expression will be filtered out and not shown.

FamousWolf avatar Sep 02 '24 13:09 FamousWolf

Can you use this to filter in events too instead of out? Do you have an example we can work off of? Does it filter on a per calendar basis?

broyuken avatar Sep 02 '24 14:09 broyuken

It uses regular expression, which are very versatile. So yes, you can filter out any events that does not contain a certain string. It does get rather complex quickly though.

A simple example would be to filter out any even that contains the words secret or private, which would be filter: '(private|secret)'.

To filter out anything that does not contain the words secret or private you would need to use something called a negative lookahead assertion, which would be something like: filter: '^((?!(private|secret)).)*$'.

The current filter is for events from all calendars. It is currently not possible to only filter events from a single calendar and not others.

FamousWolf avatar Sep 03 '24 07:09 FamousWolf

So this wouldn’t solve my use cases then. I only want to filter IN events that say “company holiday” from my work calendar. Or filter in events with my wife’s name from her class calendar. Should we reopen this issue or should I open a new request to track this?

broyuken avatar Sep 03 '24 11:09 broyuken

Please create a new issue for this

FamousWolf avatar Sep 03 '24 13:09 FamousWolf