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

Documentation: FreshRSS FilterTitle: How is this different from in-built mark article as read in freshrss? #13

Closed
lamyergeier opened this issue Mar 4, 2024 · 23 comments · Fixed by #15
Assignees
Labels
enhancement New feature or request

Comments

@lamyergeier
Copy link

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?

Copy link

github-actions bot commented Mar 4, 2024

Welcome lamyergeier 🎉

Congrats to your first issue!

@cn-tools
Copy link
Owner

cn-tools commented Mar 4, 2024

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.

@cn-tools cn-tools self-assigned this Mar 4, 2024
@lamyergeier
Copy link
Author

lamyergeier commented Mar 4, 2024

@cn-tools
Copy link
Owner

cn-tools commented Mar 4, 2024

maybe future comes earlier as i thinked a few hours ago 😆

@cn-tools cn-tools added the enhancement New feature or request label Mar 5, 2024
@cn-tools cn-tools linked a pull request Mar 5, 2024 that will close this issue
@cn-tools
Copy link
Owner

cn-tools commented Mar 5, 2024

@lamyergeier feel free to try the extension FilterTitle with now implemented regex

@lamyergeier
Copy link
Author

lamyergeier commented Mar 5, 2024

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.

@cn-tools
Copy link
Owner

cn-tools commented Mar 6, 2024

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

@cn-tools cn-tools reopened this Mar 6, 2024
@lamyergeier
Copy link
Author

lamyergeier commented Mar 8, 2024

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

@cn-tools
Copy link
Owner

cn-tools commented Mar 8, 2024

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

@lamyergeier
Copy link
Author

May be we should have separate black and white lists?

@cn-tools
Copy link
Owner

sounds good

i have provided an update to version v0.0.3 of xExtension-FilterTitle

@cn-tools cn-tools reopened this Mar 11, 2024
@lamyergeier
Copy link
Author

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.

@cn-tools
Copy link
Owner

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

@lamyergeier
Copy link
Author

lamyergeier commented Mar 12, 2024

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

@lamyergeier
Copy link
Author

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.

@cn-tools
Copy link
Owner

@lamyergeier checkbox for "mark as read" is available in the actual version
i'm waiting for your response

@lamyergeier
Copy link
Author

lamyergeier commented Mar 12, 2024

@cn-tools I updated the extension, enabled this setting, would confirm that it works , if I see non latin feeds marked read.

@lamyergeier
Copy link
Author

@cn-tools Issue: checkbox selection does not persist in GUI!

@cn-tools
Copy link
Owner

@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

@lamyergeier
Copy link
Author

Title with punctuation marks getting ignored!

Solution: include every supported property code (PHP: Unicode character properties - Manual)

example:

image

@cn-tools
Copy link
Owner

could you send me your regex please, because if you allow i would like to add it to examples

@lamyergeier
Copy link
Author

lamyergeier commented Mar 13, 2024

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.

@cn-tools
Copy link
Owner

here is a regex provided as you are searching for: https://stackoverflow.com/a/70533736

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.

2 participants