Closed lamyergeier closed 6 months ago
Congrats to your first issue!
With this extension the new feed entry will NOT be added into your FreshRSS database / instance. The equivalent entry is fully blocked.
At the moment it's string compare only. Maybe comes regex compare in the future.
Regex support can solve this issue:
maybe future comes earlier as i thinked a few hours ago 😆
@lamyergeier feel free to try the extension FilterTitle with now implemented regex
Can I do as follows (do I need to use /
(as we do with sed
)?)
/[sS]ponsor/
/[aA]dvertisement/
/[sS]horts?/
Is it possible to specify case insensitvity like
/sponsor/i
/advertisement/i
/shorts?/i
What about pattern with space
/North Korea/
Could you suggest regex to ignore non-latin scripts (example, Chinese, Japanese, Korean, Arabic, Thai, Hindi, Tamil, Kannada, Telugu languages)?
I am not sure about the syntax.
i reworked the plug in with #17 , so update your installation please.
you can now define how the check result should be used. use as block or release.
in your case i think you have to use release
and regex /\p{Latin}/i
Could you please say what is meant by block, release and exam type?
For my above examples I entered the following in the extension options (not sure what to choose for exam type):
/[sS]ponsor/i
/[aA]dvertisement/i
/[sS]horts?/i
/North Korea/
/\p{Latin}/i
I think I should define a clearer text 🤪
The exam type determines how the result of the check is used. This allows you to specify that the keywords are applied as a blacklist or whitelist to the title of the feed entry.
In your issue 6144 you say that you wants feed entries with Latin chars in title only.
And in this case i would define release
and as keyword /\p{Latin}/i
May be we should have separate black and white lists?
sounds good
i have provided an update to version v0.0.3 of xExtension-FilterTitle
So if I add /\p{Latin}/i
in whitelist, then feeds with non latin charaters will get automatically deleted?
Also may I request if its possible to add an option to either delete or mark as read based on the filter.
Yes, if you add this expression to the whitelist, the new feed entry will not be added to the database
I will try to provide an option to set the new feed entry to be added to the database as read
I will try to provide an option to set the new feed entry to be added to the database as read
may be its useful to give this option separately for whitelist and blacklist for more granular control. that is in total 2 times, once each for the entire whitelist and the entire blacklist
May be its also useful to tag the filtered and read feeds as FilterTitle to indicate that those feeds were marked read automatically by the extension.
@lamyergeier checkbox for "mark as read" is available in the actual version i'm waiting for your response
@cn-tools I updated the extension, enabled this setting, would confirm that it works , if I see non latin feeds marked read.
@cn-tools Issue: checkbox selection does not persist in GUI!
@lamyergeier ah sh*t - sorry
i used a wrong save name for data of the checkbox.
update once again please. you must set the checkbox new and save it.
waiting for your answer
Title with punctuation marks getting ignored!
Solution: include every supported property code (PHP: Unicode character properties - Manual)
example:
could you send me your regex please, because if you allow i would like to add it to examples
Can you check if the whitelist is working? I did the following:
<?php
$String="தமிழ் அரிச்சுவடி";
if (preg_match("/\p{Latin}/i", $String)) {
echo "A match was found in $String.\n";
} else {
echo "A match was not found in $String.\n";
}
returns,
A match was found in தமிழ் அரிச்சுவடி.
May be we could write unit test for regex. I don't know PHP or else I would have contributed myself. Above is my first PHP code ever.
here is a regex provided as you are searching for: https://stackoverflow.com/a/70533736
Freshrss has native feature to mark article as read based on the keywords: [Filtering articles](https://freshrss.github.io/FreshRSS/en/users/10_filter.html)
How is this different than that? Does it support regex?