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

Expr support #103

Open
kgaughan opened this issue Jul 31, 2024 · 0 comments
Open

Expr support #103

kgaughan opened this issue Jul 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kgaughan
Copy link
Owner

kgaughan commented Jul 31, 2024

expr popped into my mind today. I think it'd be a good way of solving #49 and a bunch of other issues in a very general fashion. It could be used to implement a set of filter/transform rules per feed and also more generally.

The syntax could be as follows:

[[feed]]
name = "Keith Gaughan"
feed = "https://keith.gaughan.ie/feeds/all.xml"

[[feed.filter]]
when = "<expression>"
transform = "<expression>"
action = "continue|stop"

Each field would be optional, with when evaluating to true by default, transform passing everything through by default, and action defaulting to continue. That should be general for a good portion of possible needs and could maybe be supplemented by some functions.

Named filters might also be useful. Not sure if I'll implement that, but if I were to, an extra use key could reference a named filter, with [filter.foo] being the syntax for declaring them.

@kgaughan kgaughan added the enhancement New feature or request label Jul 31, 2024
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

No branches or pull requests

1 participant