mirror of
https://codeberg.org/Reuh/feather.git
synced 2025-10-27 18:19:32 +00:00
95 lines
4.5 KiB
TOML
95 lines
4.5 KiB
TOML
[server]
|
||
# Server API to use. Either "googlereader" for the Google Reader API (FreshRSS, Miniflux, etc.) or "ttrss" for the TinyTiny-RSS API.
|
||
# The Google Reader API do not support nested categories.
|
||
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/"
|
||
# (Required) Username/email-adress used to connect to the server
|
||
# Can be set through the environment variable SERVER_USER.
|
||
user = "username"
|
||
# (Required) Password/API password used to connect to the server
|
||
# Can be set through the environment variable SERVER_PASSWORD.
|
||
password = "password"
|
||
# How many items to retrieve at most from the server in a single request. Lower values will make synchronization slower, higher values might make the server complain.
|
||
# If you are using the Google Reader API: servers should be okay with up to 1000.
|
||
# If you are using the ttrss API: servers should be okay with up to 200.
|
||
# Can be set through the environment variable SERVER_ITEMS_PER_REQUEST.
|
||
items_per_request = 500
|
||
|
||
[directories]
|
||
# Directory path where the internal feather data will be stored.
|
||
# Can be set through the environment variable DIRECTORIES_DATA.
|
||
data = "data"
|
||
# Directory path where the user-facing files will be stored.
|
||
# Can be set through the environment variable DIRECTORIES_READER.
|
||
reader = "reader"
|
||
|
||
[html]
|
||
# HTML template used for generating item HTML files. All templates are Jinja2 templates.
|
||
# Can be set through the environment variable HTML_TEMPLATE.
|
||
template = '''
|
||
<!doctype html>
|
||
<html lang="en-US">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width" />
|
||
<title>{{ title }}</title>
|
||
</head>
|
||
<body style="background-color:black; color:white;">
|
||
<style>a{color:palevioletred; text-decoration:none;}</style>
|
||
<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>
|
||
{% 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="{{ article_url }}">{{ title }}</a></h1>
|
||
<h3>{{ author }}</h3>
|
||
{% 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 = "[{{ feed_title }}]\t{{ title }} ({{ published_formatted }}).html"
|
||
# Category directory name template for generated HTML files.
|
||
# Can be set through the environment variable HTML_CATEGORY_TEMPLATE.
|
||
category_template = "{% if order %}{{ '%02d' % order }} {% endif %}{{ 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
|
||
# Table mapping characters to what they will be replaced with in filenames. Useful to remove/replace characters that are not allowed in filename by your filesystem. The default should be fine for most Unix filesystems.
|
||
filename_replacement = { "/" = "⧸", "\u0000" = "" }
|
||
|
||
[datetime]
|
||
# Which timezone to use when writing date and time.
|
||
# Can be set through the environment variable DATETIME_TIMEZONE.
|
||
timezone = "Etc/UTC"
|
||
# How date and time are formatted. See https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior for the supported codes.
|
||
# This will be used in filenames so it's a good idea to use something sortable...
|
||
# Can be set through the environment variable DATETIME_FORMAT.
|
||
format = "%Y-%m-%d %H:%M"
|
||
|
||
[daemon]
|
||
# When running in daemon mode, feather will download changes from the server (new items, items read state) every <sync_down_every> seconds.
|
||
sync_down_every = 900
|
||
# When running in daemon mode, feather will upload local changes to the server (read items) every <sync_up_every> seconds.
|
||
sync_up_every = 60
|
||
|