Page 1 of 1

How change ttrss_entries.content when fetch a entry

Posted: 29 Sep 2016, 23:03
by cyttorak
Hello

Is there a example about how change a entry just before it is stored in the database?

I want to change the content of the entry for the real body of the web linked in the url destination.

And maybe another things like add or remove tags and modify the entry's title.

Thanks.

Re: How change ttrss_entries.content when fetch a entry

Posted: 29 Sep 2016, 23:45
by fox
a lot of plugins do exactly this, i.e. readability or w/e else

Re: How change ttrss_entries.content when fetch a entry

Posted: 29 Sep 2016, 23:55
by cyttorak
can you link me one? please
or tell me which hook I have to use.

Thanks.

Re: How change ttrss_entries.content when fetch a entry

Posted: 30 Sep 2016, 07:54
by fox
article filter hook, any of the af_ plugins would do as an example. the reddit embed one, for example.

Re: How change ttrss_entries.content when fetch a entry

Posted: 30 Sep 2016, 08:21
by cyttorak
thanks

Re: How change ttrss_entries.content when fetch a entry

Posted: 30 Sep 2016, 11:36
by cyttorak
Sorry, but I don't find this example in
https://tt-rss.org/gitlab/fox/tt-rss-at ... er/plugins
neither
https://tt-rss.org/gitlab/fox/tt-rss-sa ... le-plugins

where is af_ plugins/reddit example?

Thanks

Re: How change ttrss_entries.content when fetch a entry

Posted: 30 Sep 2016, 11:47
by cyttorak
Hi

I have found this: https://gist.github.com/pluser/3039ffacfffa8c55e63d
So, I think is HOOK_ARTICLE_FILTER the hook I need, isn't it?
Is this hook executed before ttrss_entries.content is stored in the data base?

Re: How change ttrss_entries.content when fetch a entry

Posted: 30 Sep 2016, 12:02
by fox
the file you're looking for is (tt-rss)/plugins/af_redditimgur (any other af plugin would do)

>So, I think is HOOK_ARTICLE_FILTER the hook I need, isn't it?

that's what i said

>Is this hook executed before ttrss_entries.content is stored in the data base?

well it would be rather useless to do it the other way around doesn't it

maybe start thinking a bit on your own before posting