Skip to content

Execution order/future works #120

@dugite-code

Description

@dugite-code

Future Discussion

Filters could use an Observer pattern to make extending and modifying FeedIron a simpler task. This would Also free up Filters so they can be better mixed and matched.

THIS WOULD BE A BREAKING CHANGE

I'm proposing adding an execution order to filters. I feel this makes filter a bit more readable not to mention powerful. For example you could have a "processed" variable so an option could choose to work on the original html or the processed html passed from previous operations.

"somesite.com":{
	"1": {
		"type": "readability"
	},
	"2": {
		"type": "insert",
		"string": "<br>"
	},
	"3": {
		"type": "xpath",
		"processed": false,
		"xpath": "article",
		"cleanup": "h2"
	},
	"join_element": "<p>",
	"cleanup": ["~<script([^<]|<(?!/script))*</script>~msi"],
	"debug": true
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions