Filter action to remove tags?

With filters and the action “Assign tags” I can add tags. Is there a way to automatically remove tags from articles?

Usually, I like that articles come with tags. But 1 high volume feed tags all articles with “archive” which in this particular case is pointless because the feed is about music album releases. So I was wondering how to remove this tag.

e: typo fixed

not in stock. you should be able to write a plugin to do this. filter actions are extensible.

If anybody’s still interested I have this tiny tiny plugin that deletes all tags (I don’t care for any of them). It’s invoked by my last filter rule.

<?php
class Remove_All_Tags extends Plugin {
    private $host;

    function about() {
        return array(1.0,
            "Remove all tags",
            "vnab");
    }

    function init($host) {
        $this->host = $host;
        $host->add_hook($host::HOOK_ARTICLE_FILTER_ACTION, $this);
        $host->add_filter_action($this, "Remove all tags", "Remove all tags");
    }

    function hook_article_filter_action($article, $action) {
	        $article["tags"] = array();
        return $article;
    }

    function api_version() {
        return 2;
    }
}
?>

btw there’s a filter action to ignore tags, has been added for some time now.

I hope it’s OK to drag up an old thread, but what exactly does “ignore tags” do?

Does it mean “if other filters have applied tags to an article, this filter will remove them”?

yep.

if article has tags specified in this action, they would be removed before article is saved in the database.

just in case, check the faq entry here - https://tt-rss.org/wiki/ContentFilters - filters might not work just as you’d expect them to.

fox, there is an action to “ignore tags” but it seems to expect a tag name. Can a regex be used (“*”) or a comma separated list? I clicked the filters link you had in your post and it doesn’t include ignore tags as an action

i think it’s a comma-separated list, same as ‘assign tags’ filter action.

yeah my bad, i forgot to update the wiki page. could be more actions missing there.

thanks. would love a regex there or an ignore all tags. i’ve found that a lot of feeds put every imaginable keyword in tags so you’ll match a filter or a search will give a lot of irrelevant results.

hmmm, regexp would break existing behavior. even though it’s better than a comma-separated list.

its unlikely a lot of people use this feature as it is now tho.

p.s. as far as i remember, filter system is pluggable…

https://tt-rss.org/wiki/ContentFilters i’ve updated the wiki page here

as for ignoring glob/regexp-patterns of tags, maybe it should be a plugin or something, i’d rather not break existing functionality, just in case.