You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.8 KiB
Django/Jinja

{# Metadata generator #}
<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
<channel>
{% if result.rss.title %}
{% if ask.rss.type == "search" %}
<title>{{ strings.gen.feed.any.title.search.format(result.rss.title) }}</title>
{% elif ask.rss.type == "status" %}
<title>{{ strings.gen.feed.any.title.status }}</title>
{% else %}
<title>{{ strings.err.gen.UnknownFeedType }}</title>
{% endif %}
{% else %}
<title>{{ strings.err.gen.UnknownFeedName }}</title>
{% endif %}
{% if result.rss.description %}
{% if ask.rss.type == "search" %}
{% if ask.query.limit not 0 %}
<description>{{ strings.gen.feed.any.description.search.limited.format(ask.query.limit,result.rss.title) }}</description>
{% else %}
<description>{{ strings.gen.feed.any.description.search.unlimited.format(result.rss.title) }}</description>
{% endif %}
{% elif ask.rss.type == "status" %}
<description>{{ strings.gen.feed.any.description.status }}</description>
{% else %}
<description>{{ strings.err.gen.UnknownFeedDescription }}</description>
{% endif %}
{% endif %}
{% if result.rss.link %}
{% if ask.source %}
<link>{{ ask.source.urls.goto % result.rss.link }}</link>
{% else %}
<link>{{ result.rss.link }}</link>
{% endif %}
{% endif %}
<builddate>{{ ask.requestDate }}</builddate>
<pubdate></pubdate>
<language>{{ "%-%".format(ask.lang.lower(),ask.region.lower()) }}</language>
<generator>superTinySearch API Frontend v{{ meta.api.version }} using Python Jinja v3</generator>
{% for item in result.rss.items %}
{% include 'xml.blocks.rss2.item.xml.jinja' %}
{% endfor %}
</channel>
</rss>