feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
204 stars 34 forks source link

Is it possible to use the original (article) url in modify rules? #194

Closed rookiejet closed 4 months ago

rookiejet commented 10 months ago

I would like to do something like

"replace": [
    "src=\"$url/"
]

or in readability "relativeurl": "$url\/" where $url is the original article url.

dugite-code commented 10 months ago

Currently no, but it's actually an excellent idea for an enhancement. Getting all the parts from parse_url is certainly simple enough. Evaluating the variables in the replace function might need a bit of noodling though, I know you can use curly brackets in an echo around a variable but not sure in preg_replace.

rookiejet commented 4 months ago

Thank you @monofox and @dugite-code! I've tested it and it works great.