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

Case insensitive text filtering #93

Closed
RebbePod opened this issue Apr 25, 2021 · 13 comments · Fixed by #135
Closed

Case insensitive text filtering #93

RebbePod opened this issue Apr 25, 2021 · 13 comments · Fixed by #135
Labels
enhancement New feature or request

Comments

@RebbePod
Copy link

RebbePod commented Apr 25, 2021

I just want to start off saying: thank you very much @aahnik everything is working perfectly!

Just a nice to have feature would be to have the whitelist and blacklist filters, have an optional match-case / match whole word option.

@RebbePod RebbePod added the enhancement New feature or request label Apr 25, 2021
@aahnik aahnik changed the title Text Filter Enhancement Case insensitive text filtering Apr 26, 2021
@aahnik
Copy link
Owner

aahnik commented Apr 26, 2021

that's a good idea. I will try to implement it soon!

@ehs4nm
Copy link

ehs4nm commented May 4, 2021

i want to add something here: words start with characters like '@' or '#' can't be filtered.

@aahnik
Copy link
Owner

aahnik commented May 5, 2021

i want to add something here: words start with characters like '@' or '#' can't be filtered.

is this a feature request ? or you mean this happens ?

by the way, this feature is coming in the next release!

@aahnik
Copy link
Owner

aahnik commented May 8, 2021

hi @ehs4nm and @RebbePod

After v0.1.29, by default text filtering will be case insensitive.

If you need case-sensitive text filtering, you can set it to true.

see example configuration

plugins:
  filter:
    text:
      case_sensitive: true # default is false if you don't write this line
      whitelist: ["this word"]
      blacklist: ["hello"]

@ehs4nm
Copy link

ehs4nm commented May 8, 2021

Thanks ahhnik. :)

@ehs4nm
Copy link

ehs4nm commented May 8, 2021

i want to add something here: words start with characters like '@' or '#' can't be filtered.

is this a feature request ? or you mean this happens ?

by the way, this feature is coming in the next release!

Yes. when someone wants to omit "@someid" the program run in to error.

@RebbePod
Copy link
Author

RebbePod commented May 9, 2021

Thank you, I just want to note that the default previously was true, so if updating something to note.

I also would like to suggest this feature request remains open, being that the second half of the suggestion isn't yet implemented. That is the match whole word option.

@RebbePod
Copy link
Author

RebbePod commented May 9, 2021

Also an another note, it may be a good idea to have the case sensitive option be separated for the blacklist and whitelist, not necessary for me, but a nice to have.

@aahnik
Copy link
Owner

aahnik commented May 9, 2021

what do you mean by match whole words ? @RebbePod

@RebbePod
Copy link
Author

If I'm looking for "good" for example, if it matches only whole words the following would match:
"Good job!"
While this won't:
"Goodness gracious"

@aahnik
Copy link
Owner

aahnik commented May 11, 2021

If I'm looking for "good" for example, if it matches only whole words the following would match:
"Good job!"
While this won't:
"Goodness gracious"

issue #136 will fix it

@RebbePod
Copy link
Author

RebbePod commented May 11, 2021

Regex would would fix it, but lots of people don't know regex, I think it would be great to have as a separate basic option, and for advanced functions regex can be used.

@aahnik
Copy link
Owner

aahnik commented Jun 11, 2021

Yes. when someone wants to omit "@someid" the program run in to error.

@ehs4nm there is no problem. with the latest version of tgcf, I tested

read #138 (comment)

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

Successfully merging a pull request may close this issue.

3 participants