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

Regex filtering through environment variables for responses? #61

Open
fuel-pcbox opened this issue Nov 18, 2023 · 2 comments
Open

Regex filtering through environment variables for responses? #61

fuel-pcbox opened this issue Nov 18, 2023 · 2 comments

Comments

@fuel-pcbox
Copy link

I have extremely severe Tourette's Syndrome, and almost all of my triggers are extremely common, and cause me great physical pain through motor tics (taking the form of painful twitching). Unfortunately, some of my triggers are in the current database of responses for certain moods, so I can't exactly use the full extent of cargo-mommy's features, without editing responses.json. Thankfully, if cargo-mommy supported regexes (with hex escapes so that I don't have to type my triggers, since that would also trigger me) for filtering out certain responses via an environment variable, all I'd have to do is set an environment variable in my .bashrc or whatever, and cargo-mommy would be safe for me to use. Sadly, I don't have much experience with the Rust ecosystem, so I have no idea what crates would be best for this, or how to implement this effectively.

@fuel-pcbox
Copy link
Author

I will also note that I have something similar set up for my IRC client, HexChat, using a Python script. It's kinda finicky and doesn't always work, but when it does it's pretty great.

@FWDekker
Copy link

Not to toot my own horn (well, maybe just a little bit), but my own mommy implementation allows you to filter out phrases that include specific words or phrases using the MOMMY_FORBIDDEN_WORDS setting. If you have any issues or suggestions for the feature, feel free to open an issue over there.

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

No branches or pull requests

2 participants