-
Notifications
You must be signed in to change notification settings - Fork 3
Template
Habib Rohman edited this page Feb 11, 2021
·
1 revision
Since most of the feeds contain web elements, telegram-rss will send the message with parse_mode=HTML.
Template file is located at telegram-rss/template.html.
template.html is loaded using jinja2, Learn more.
Default template is
<a href="{{ entry.link }}">{{ entry.safe_title }}</a>
<i>{{ author }}</i>: <b>{{ entry.author }}</b>
{{ entry.safe_description }}
<i>{{ source }}</i>: <a href="{{ channel.link }}">{{ channel.safe_title }}</a><b>bold</b>, <strong>bold</strong>
<i>italic</i>, <em>italic</em>
<u>underline</u>, <ins>underline</ins>
<s>strikethrough</s>, <strike>strikethrough</strike>, <del>strikethrough</del>
<b>bold <i>italic bold <s>italic bold strikethrough</s> <u>underline italic bold</u></i> bold</b>
<a href="http://www.example.com/">inline URL</a>
<a href="tg://user?id=123456789">inline mention of a user</a>
<code>inline fixed-width code</code>
<pre>pre-formatted fixed-width code block</pre>
<pre><code class="language-python">pre-formatted fixed-width code block written in the Python programming language</code></pre>Please note:
- Only the tags mentioned above are currently supported.
- All
<,>and&symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (<with<,>with> and&with&). - All numerical HTML entities are supported.
- The API currently supports only the following named HTML entities:
<,>,& and". - Use nested
preandcodetags, to define programming language forpreentity. - Programming language can't be specified for standalone
codetags.