Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Exact pattern matching #361

Open
2 tasks done
stieler-it opened this issue Jul 30, 2024 · 4 comments
Open
2 tasks done

[Feature]: Exact pattern matching #361

stieler-it opened this issue Jul 30, 2024 · 4 comments
Labels

Comments

@stieler-it
Copy link

Requirements

  • I have updated Mushroom to the latest available version
  • I did a search to see if there is a similar issue or if a pull request is open.

Is your feature request related to a problem?

Our city offers different frequencies of pickup of the same trash type. The workers can identify it by the color of the lid of the trashcans and this also leads to similar names in the ICS, e.g. "Paper" and "Paper (yellow lid)". If I now specify a pattern of "Paper" it matches both, although I only want to match the first one.

Describe the solution you'd like

Add an option "exact match" to define a pattern that needs to, well, match exactly, not just a part of the entry

Describe alternatives you've considered

I also thought about integrating regular expressions. So one could write ^Paper$. Maybe there could be some kind of auto-detection if the pattern is a string or a reg.exp.

Additional context

No response

@Arcane1980
Copy link

I don't fully understand your integration issue.

Are you pulling on calendar entries that you have control over or are you pulling from a calendar run by your garbage collection or council entity?

If it is your own calendar, then perhaps putting unique names yourself rather than relying on the standard format. If it is an external calendar you cannot edit, how often does the actual routine change? If it is a set routine for YOUR bin collection, maybe ignoring the provided calendar and creating your own entries would be the easiest and simplest way to achieve this.

Just spit balling solutions whilst a feature addition is still a ways off.

@stieler-it
Copy link
Author

Thanks for asking questions for clarifications. We are using a provided calendar. Our city offers two service levels for garbage, they show up in the calendar as "Restmüll" und "Restmüll (grüner Deckel)" which translates to "Garbage" and "Garbage (green lid)".
Relevant for us is only "Garbage" but the current filter also shows "Garbage (green lid)".
The routine does not actually change, it is like weekly versus 4 weekly so every few weeks we see a wrong entry.

@Arcane1980
Copy link

Arcane1980 commented Sep 3, 2024

That's super frustrating @stieler-it . I don't have the knowledge or ability to fix the backend on this, but perhaps copying the calendar over to one you control and removing the bins that aren't relevant or renaming to 'more unique' names would be the work around for now.

@idaho is there a simple fix to the coding for this add on that would allow this shortened and extended versions of names to be seen as unique?

@stieler-it
Copy link
Author

Thank you, it's not frustrating just a small inconvenience happening every few weeks.
To your solution idea: Combining different items seems a too complicated approach and doesn't fully match the real-life problem. I think making it possible to chosse an exact match instead of a regexp match for entries would be closer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants