Compare commits

...

2 Commits

Author SHA1 Message Date
fdd8e19aa3 Update pre-commit hook versions for uv-pre-commit and ruff
Some checks failed
Test and build Docker image / docker (push) Failing after 38s
2025-06-25 05:41:13 +02:00
2ef03c8b45 Fix formatting of tags in /custom 2025-06-25 05:38:47 +02:00
2 changed files with 254 additions and 254 deletions

View File

@ -1,7 +1,7 @@
repos:
# Ensure the lockfile is up-to-date and autoexport uv.lock to requirements.txt
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.7.12
rev: 0.7.14
hooks:
- id: uv-lock
- id: uv-export
@ -45,7 +45,7 @@ repos:
# An extremely fast Python linter and formatter.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
rev: v0.12.0
hooks:
- id: ruff-format
- id: ruff

View File

@ -1,252 +1,252 @@
{% extends "base.html" %}
{% block title %}
| Custom message
{% endblock title %}
{% block content %}
<div class="p-2 border border-dark">
<form action="/custom" method="post">
<!-- Feed URL -->
<div class="row pb-2">
<div class="col-sm-12">
<div class="form-text">
<ul class="list-inline">
<li>You can modify the message that is sent to Discord.</li>
<li>You can use \n to create a new line.</li>
<li>
You can remove the embed from links by adding < and> around the link. (For example <
{% raw %} {{ entry_link }} {% endraw %}>)
</li>
<br />
<li>
<code>
{% raw %}
{{ feed_author }}
{% endraw %}
</code>{{ feed.author }}
</li>
<li>
<code>
{% raw %}
{{ feed_added }}
{% endraw %}
</code>{{ feed.added }}
</li>
<li>
<code>
{% raw %}
{{ feed_last_exception }}
{% endraw %}
</code>{{ feed.last_exception }}
</li>
<li>
<code>
{% raw %}
{{ feed_last_updated }}
{% endraw %}
</code>{{ feed.last_updated }}
</li>
<li>
<code>
{% raw %}
{{ feed_link }}
{% endraw %}
</code>{{ feed.link }}
</li>
<li>
<code>
{% raw %}
{{ feed_subtitle }}
{% endraw %}
</code>{{ feed.subtitle }}
</li>
<li>
<code>
{% raw %}
{{ feed_title }}
{% endraw %}
</code>{{ feed.title }}
</li>
<li>
<code>
{% raw %}
{{ feed_updated }}
{% endraw %}
</code>{{ feed.updated }}
</li>
<li>
<code>
{% raw %}
{{ feed_updates_enabled }}
{% endraw %}
</code>{{ feed.updates_enabled }}
</li>
<li>
<code>
{% raw %}
{{ feed_url }}
{% endraw %}
</code>{{ feed.url }}
</li>
<li>
<code>
{% raw %}
{{ feed_user_title }}
{% endraw %}
</code>{{ feed.user_title }}
</li>
<li>
<code>
{% raw %}
{{ feed_version }}
{% endraw %}
</code>{{ feed.version }}
</li>
<br />
{% if entry %}
<li>
<code>
{% raw %}
{{ entry_added }}
{% endraw %}
</code>{{ entry.added }}
</li>
<li>
<code>
{% raw %}
{{ entry_author }}
{% endraw %}
</code>{{ entry.author }}
</li>
{% if entry.content %}
<li>
<code>
{% raw %}
{{ entry_content }}
{% endraw %}
</code>{{ entry.content[0].value|discord_markdown }}
</li>
<li>
<code>
{% raw %}
{{ entry_content_raw }}
{% endraw %}
</code>{{ entry.content[0].value }}
</li>
{% endif %}
<li>
<code>
{% raw %}
{{ entry_id }}
{% endraw %}
</code>{{ entry.id }}
</li>
<li>
<code>
{% raw %}
{{ entry_important }}
{% endraw %}
</code>{{ entry.important }}
</li>
<li>
<code>
{% raw %}
{{ entry_link }}
{% endraw %}
</code>{{ entry.link }}
</li>
<li>
<code>
{% raw %}
{{ entry_published }}
{% endraw %}
</code>{{ entry.published }}
</li>
<li>
<code>
{% raw %}
{{ entry_read }}
{% endraw %}
</code>{{ entry.read }}
</li>
<li>
<code>
{% raw %}
{{ entry_read_modified }}
{% endraw %}
</code>{{ entry.read_modified }}
</li>
{% if entry.summary %}
<li>
<code>
{% raw %}
{{ entry_summary }}
{% endraw %}
</code>{{ entry.summary|discord_markdown }}
</li>
<li>
<code>
{% raw %}
{{ entry_summary_raw }}
{% endraw %}
</code>{{ entry.summary }}
</li>
{% endif %}
<li>
<code>
{% raw %}
{{ entry_title }}
{% endraw %}
</code>{{ entry.title }}
</li>
<li>
<code>
{% raw %}
{{ entry_text }}
{% endraw %}
</code> Same as entry_content if it exists, otherwise entry_summary
</li>
<li>
<code>
{% raw %}
{{ entry_updated }}
{% endraw %}
</code>{{ entry.updated }}
</li>
<br />
<li>
<code>
{% raw %}
{{ image_1 }}
{% endraw %}
</code>First image in the entry if it exists
</li>
</ul>
<ul class="list-inline">
<li>Examples:</li>
<li>
<code>
{% raw %}
{{ feed_title }}\n{{ entry_content }}
{% endraw %}
</code>
</li>
</ul>
{% else %}
Something went wrong, there was no entry found. If this feed has entries and you still see this
message, please contact the developer.
{% endif %}
</div>
<label for="custom_message" class="col-sm-6 col-form-label">Message</label>
<input name="custom_message" type="text" class="form-control bg-dark border-dark text-muted"
id="custom_message" {% if custom_message %} value="{{- custom_message -}}" {% endif %} />
</div>
</div>
<!-- Add a hidden feed_url field to the form -->
<input type="hidden" name="feed_url" value="{{ feed.url }}" />
<!-- Submit button -->
<div class="d-md-flex">
<button class="btn btn-dark btn-sm">Update message</button>
</div>
</form>
</div>
{% endblock content %}
{% extends "base.html" %}
{% block title %}
| Custom message
{% endblock title %}
{% block content %}
<div class="p-2 border border-dark">
<form action="/custom" method="post">
<!-- Feed URL -->
<div class="row pb-2">
<div class="col-sm-12">
<div class="form-text">
<ul class="list-inline">
<li>You can modify the message that is sent to Discord.</li>
<li>You can use \n to create a new line.</li>
<li>
You can remove the embed from links by adding < and> around the link. (For example <
{% raw %} {{entry_link}} {% endraw %}>)
</li>
<br />
<li>
<code>
{% raw %}
{{feed_author}}
{% endraw %}
</code>{{ feed.author }}
</li>
<li>
<code>
{% raw %}
{{feed_added}}
{% endraw %}
</code>{{ feed.added }}
</li>
<li>
<code>
{% raw %}
{{feed_last_exception}}
{% endraw %}
</code>{{ feed.last_exception }}
</li>
<li>
<code>
{% raw %}
{{feed_last_updated}}
{% endraw %}
</code>{{ feed.last_updated }}
</li>
<li>
<code>
{% raw %}
{{feed_link}}
{% endraw %}
</code>{{ feed.link }}
</li>
<li>
<code>
{% raw %}
{{feed_subtitle}}
{% endraw %}
</code>{{ feed.subtitle }}
</li>
<li>
<code>
{% raw %}
{{feed_title}}
{% endraw %}
</code>{{ feed.title }}
</li>
<li>
<code>
{% raw %}
{{feed_updated}}
{% endraw %}
</code>{{ feed.updated }}
</li>
<li>
<code>
{% raw %}
{{feed_updates_enabled}}
{% endraw %}
</code>{{ feed.updates_enabled }}
</li>
<li>
<code>
{% raw %}
{{feed_url}}
{% endraw %}
</code>{{ feed.url }}
</li>
<li>
<code>
{% raw %}
{{feed_user_title}}
{% endraw %}
</code>{{ feed.user_title }}
</li>
<li>
<code>
{% raw %}
{{feed_version}}
{% endraw %}
</code>{{ feed.version }}
</li>
<br />
{% if entry %}
<li>
<code>
{% raw %}
{{entry_added}}
{% endraw %}
</code>{{ entry.added }}
</li>
<li>
<code>
{% raw %}
{{entry_author}}
{% endraw %}
</code>{{ entry.author }}
</li>
{% if entry.content %}
<li>
<code>
{% raw %}
{{entry_content}}
{% endraw %}
</code>{{ entry.content[0].value|discord_markdown }}
</li>
<li>
<code>
{% raw %}
{{entry_content_raw}}
{% endraw %}
</code>{{ entry.content[0].value }}
</li>
{% endif %}
<li>
<code>
{% raw %}
{{entry_id}}
{% endraw %}
</code>{{ entry.id }}
</li>
<li>
<code>
{% raw %}
{{entry_important}}
{% endraw %}
</code>{{ entry.important }}
</li>
<li>
<code>
{% raw %}
{{entry_link}}
{% endraw %}
</code>{{ entry.link }}
</li>
<li>
<code>
{% raw %}
{{entry_published}}
{% endraw %}
</code>{{ entry.published }}
</li>
<li>
<code>
{% raw %}
{{entry_read}}
{% endraw %}
</code>{{ entry.read }}
</li>
<li>
<code>
{% raw %}
{{entry_read_modified}}
{% endraw %}
</code>{{ entry.read_modified }}
</li>
{% if entry.summary %}
<li>
<code>
{% raw %}
{{entry_summary}}
{% endraw %}
</code>{{ entry.summary|discord_markdown }}
</li>
<li>
<code>
{% raw %}
{{entry_summary_raw}}
{% endraw %}
</code>{{ entry.summary }}
</li>
{% endif %}
<li>
<code>
{% raw %}
{{entry_title}}
{% endraw %}
</code>{{ entry.title }}
</li>
<li>
<code>
{% raw %}
{{entry_text}}
{% endraw %}
</code> Same as entry_content if it exists, otherwise entry_summary
</li>
<li>
<code>
{% raw %}
{{entry_updated}}
{% endraw %}
</code>{{ entry.updated }}
</li>
<br />
<li>
<code>
{% raw %}
{{image_1}}
{% endraw %}
</code>First image in the entry if it exists
</li>
</ul>
<ul class="list-inline">
<li>Examples:</li>
<li>
<code>
{% raw %}
{{feed_title}}\n{{entry_content}}
{% endraw %}
</code>
</li>
</ul>
{% else %}
Something went wrong, there was no entry found. If this feed has entries and you still see this
message, please contact the developer.
{% endif %}
</div>
<label for="custom_message" class="col-sm-6 col-form-label">Message</label>
<input name="custom_message" type="text" class="form-control bg-dark border-dark text-muted"
id="custom_message" {% if custom_message %} value="{{- custom_message -}}" {% endif %} />
</div>
</div>
<!-- Add a hidden feed_url field to the form -->
<input type="hidden" name="feed_url" value="{{ feed.url }}" />
<!-- Submit button -->
<div class="d-md-flex">
<button class="btn btn-dark btn-sm">Update message</button>
</div>
</form>
</div>
{% endblock content %}