1
0
Fork 0
mirror of https://codeberg.org/Reuh/feather.git synced 2025-10-28 02:29:32 +00:00

feat: add support for tt-rss api

This commit is contained in:
Étienne Fildadut 2025-10-10 16:47:20 +02:00
parent 0562a245d6
commit b100d8f0b8
5 changed files with 256 additions and 70 deletions

View file

@ -1,4 +1,5 @@
[server]
api = "googlereader"
# (Required) URL of your server's Google Reader API endpoint
# Can be set through the environment variable SERVER_URL.
url = "https://rss.example.com/"
@ -37,19 +38,35 @@ template = '''
<article style="max-width:60rem; margin:auto; text-align:justify;">
<p style="display:flex; flex-direction:row; justify-content:space-between;">
<span>{{ published_formatted }}</span>
<span><a href="{{ origin_url }}">{{ origin_title }}</a></span>
<span>
{% if feed_url %}
<a href="{{ feed_url }}">
{% endif %}
{% if feed_icon_url %}
<img style="height:1em;" src="{{ feed_icon_url }}">
{% endif %}
{{ feed_title }}
{% if feed_url %}
</a>
{% endif %}
</span>
</p>
<h1><a href="{{ canonical_url }}">{{ title }}</a></h1>
<h1><a href="{{ article_url }}">{{ title }}</a></h1>
<h3>{{ author }}</h3>
<div>{{ summary | safe }}</div>
<div>{{ content | safe }}</div>
{% if content %}
<div>{{ content | safe }}</div>
{% else %}
<img src="{{ image_url }}">
<div>{{ summary | safe }}</div>
{% endif %}
</article>
</body>
</html>
'''
# Filename template for generated HTML files.
# Can be set through the environment variable HTML_FILENAME_TEMPLATE.
filename_template = "[{{ origin_title }}]\t{{ title }} ({{ published_formatted }}).html"
filename_template = "[{{ feed_title }}]\t{{ title }} ({{ published_formatted }}).html"
category_template = "{{ title }}"
# Maximum allowed filename length (in bytes assuming UTF-8 encoding) before truncating. Depending on your filesystem filename's limits it may be possible to increase the value, ask Wikipedia for details.
# Can be set through the environment variable HTML_MAX_FILENAME_LENGTH.
max_filename_length = 250