Skip to content

Conversation

@ndm13
Copy link

@ndm13 ndm13 commented Nov 20, 2022

My default Outlook free/busy sync is annoying to look at. I'm already filtering out Free and Out-of-Office blocks, but there's no way to change the text on meetings from the "Busy" or "Tentative". I figured it would be pretty easy to use the existing filter system to add the ability to remap the old text to the new text. I added part of the YAML I'm using to the README file.

Only potential blockers are that I didn't create a unit test, and that I only have a very basic familiarity with Ruby. I may not have done things to convention, but I did try to follow any patterns that were in place in the original code. The missing unit test shouldn't be too big of a deal considering the core logic of mapping.rb is delegating to the already-tested-and-unmodified filter_rule.rb.

Currently building at ghcr.io/ndm13/ical-filter-proxy:release

@darkphnx
Copy link
Owner

Hey, thanks for this - it looks really interesting. It'll definitely need a unit test, but perhaps I can help with that in the days ahead.

@darkphnx
Copy link
Owner

I'm not sure about the configuration format - embedding the rules feels a little awkward. What about adding an action to the top level of the rule. Your example would look something like:

my_calendar_name:
   # ...
   rules:
      - field: summary
        operator: equals
        val: Busy
        replace:
          - field: summary
            val: A Meeting

      - field: summary
        operator: equals
        val: Tentative
        replace:
          - field: summary
            val: A Tentative Meeting

This means you don't need a separate section for your selection and your modification, rather you can just define modifications inline with your filter.

@mjeveritt
Copy link

I'm trying to solve a problem highlighted in this post which results in a useless incorrect calendar in my Thunderbird instance for the Twitch streamers I follow.

I can see I have two choices of how to proceed - either create a potentially-huge VTIMEZONE config to add to everything, or my preferred option, simply delete the 'extraneous' slash from the TZID parameter.

This PR seems to address the functionality required, but I'm unsure whether it is complete now, based on the configuration format changes proposed. I don't mind picking up the coding if needed, so that I can make use of the proxy to pre-filter these iCal sources.

@darkphnx
Copy link
Owner

darkphnx commented Feb 5, 2025

Hi @mjeveritt - the PR author never came back to make the proposed changes to the configuration format. I'd be really happy to receive them though. Perhaps a better top-level name than rules might actually be transform? Forget that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants