Digest templates: more fields available?

Hi all,

as in my TTRSS installation labels are heavily used to give an overview of the possibly relevant content (being applied and also scored by ca. 100 filters) I would like to include the labels applied to articles also into the digest emails. No result was found using this forums search so far for this question.

So far I located this two files in the templates folder:
/templates/digest_template_html.txt
/templates/digest_template.txt

Both files use variables like this: ${ARTICLE_TITLE}

My question is, where to find a full list of all possible fields? I have checked the SQL tables but was not able to find the corresponding table and/or fields.

Many regards from Berlin/Germany

Carsten

https://git.tt-rss.org/fox/tt-rss/src/master/classes/digest.php#L169

i can add labels i guess, currently they are not available
a comma separated list could work

Thanks to take adding labels into consideration.

As the intended NGO users for the digest emails are often not technically save, including this possible solution would be much appreciated.

i’ve added ARTICLE_LABELS:

https://git.tt-rss.org/fox/tt-rss/commit/da1b3e3ba151945eb8574b37d4f0231335c9faee

since you’re not using git you’ll have to update in some other way, i suggest switching to git

Thanks for the quick addition. I download all TTRSS installation files shortly after commit da1b3e3ba, FTPed and installed it and imported my OPML export file from the 18.12 installation. Wow, 19.2 looks way fresher than 18.12!

When checking both template files it seems that ARTICLE_LABELS has been added to the file
digest_template_html.txt, but not to the file digest_template.txt

I added ${ARTICLE_LABELS} manually to the file digest_template.txt (after $BeginBlock article and before $EndBlock article), as my installation currently uses the file digest_template.txt for sending the digest emails. BTW, where can this be switched to the HTML version?

My expectation was to see the labels shown in each line, but so far I cannot see any effect in the first digest received after 14 hours of collecting new articles.

Then I manually assigned a few labels and set a few articles to unread. Multiple tries to shift the digest sending time to a timeframe in the next 30 minutes did not force TTRSS to send a new digest email.

Any ideas?

you will need to install phpmailer plugin to send mime emails

use backend.php?op=backend&method=digestTest to test digest, dont mess with server time

Thanks for the backend.php hint, looks very good.

PHPMailer - that one?
https://git.tt-rss.org/fox/ttrss-mailer-smtp

The security warning at the very beginning of the PHPMailer Readme does not scare me, but might be an issue for the admin of the planned future server at the NGO.

Any chances that the plain text template would show the same content (minus HTML bling bling) without a risky plugin?

oh no this admin might have to update something in case of a vulnerability
it’s not like this is literally his job

it’s not in stock template because mini templator doesn’t have conditionals and i didn’t want to have a blank line on every article if there’s no labels

if you need it, modify the template as you see fit. that’s why it’s there.

(maybe we need a slightly better templating engine)

All the systems are maintained on a voluntary basis done besides our full time jobs. This is the main reason why I try to avoid extra work if possible. But in general I support youtr point of view that the server admin should be able to get it done.

Currently I cannot run a full digest test cycle with the labels in the non HTML version as I ran into another problem which affects the assigning of labels by filters. But for this different issue I will create a new request, sorry.

Just tried to use the field ${ARTICLE_EXCERPT} from the HTML digest template in the non-HTML digest template, and it was not populated in the digest email being sent out. Did I miss something?

yeah excerpt was disabled for text digest, i dunno why

fix https://git.tt-rss.org/fox/tt-rss/commit/eab568065fda670d81f2cfdbf1efc86cd6f90ad0

Wasn’t able to test until now, as sending emails on my shared hoster stopped right after your answer for an unknown reason - which I just became aware yesterday.

Today’s email digest still does not show ${ARTICLE_EXCERPT} being filled, and 59d0e35b7 is the latest commit I merged into my local only branch. Any other ideas?

Thanks in advance.

https://git.tt-rss.org/fox/tt-rss/commit/4e1eeb04884ef9bc43bfda408e6bbe0089c39cb8