YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
375 stars 26 forks source link

Add option to ignore events with specific keywords #169

Closed califa closed 1 year ago

califa commented 1 year ago

I'm looking to import all of my meetings (I'm connecting these with "people" notes to create a graph of when I've seen people).

The problem I have many meetings in my calendar that don't make sense to important—blocks of time to do a task, "do not schedule" time blocks, HOLDs for meetings, or recurring reminders to do something. Some of these have to be on the same calendar as important meetings.

Would it be possible to add a feature that's like the opposite of an event marker, where I can list a few keywords that, if they appear in an event title, mean it won't get imported?

Thank you so much! Love the plugin so far :)

YukiGasai commented 1 year ago

Hi, I added another options in the settings to add ignore Words. If you just add words, it will check if the word is contained anywhere in the event title or description. If you prefix and suffix the word with / it will be interpreted as Regex and the hole summary or description has to match the Regex to be ignored.

Please test if it works for you.

califa commented 1 year ago

Ooh thank you!!

califa commented 1 year ago

Would it be possible to apply this to anywhere that imports events? Like not listing events with these keywords in Create Event Note or List gCal Events

YukiGasai commented 1 year ago

Hi, I implemented your idea. I updated the autoCreateEventNotesIgnoreList setting to ignorePatternList. The behavior should be the same, but it will filter all events right after they are fetched from Google, so the plugin should not show them anywhere. You will have to set the list again, I think, but I had to update the name to fit better with the behavior.