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

Feature/replace with url #200

Closed monofox closed 4 months ago

monofox commented 4 months ago

Please answer the following questions for yourself before submitting a pull request. YOU MAY DELETE UNUSED SECTIONS.

Bugfix/Enhancement

Fixes feediron/ttrss_plugin-feediron#194

Proposed Changes

As per the linked ticket, it was requested to have the ability to use the articles link or components of the articles link for in modify option.

This MR added the corresponding option.

Tested with following modify rules:

    "modify": [
        {
            "type": "replace",
            "search": [
                "<h2>",
                "<\/h2>"
            ],
            "replace": [
                "<h2>",
                " (Link: {$link} \/ {$host})<\/h2>"
            ]
        },
        {
            "type": "replace",
            "search": "Begeisterung",
            "replace": "<strong>(Link: {$link} \/ {$host})<\/strong>"
        },
        {
            "type": "regex",
            "pattern": "\/(.*)Mitte der ([0-9]+)er Jahre(.*)\/",
            "replace": "$1<strong>(Host: {$host}; Jahrhundert: $2)<\/strong>$3"
        }
    ]

The possible options are described in the README.md file.

Was this the intended way to go for @dugite-code ?

Best regards, monofox

dugite-code commented 4 months ago

Fantastic! Thanks for your contribution. Sorry it took me so long to get around to looking at it.