Commit c99d8831 authored by Julian Rother's avatar Julian Rother
Browse files

Extended rss feed template

parent 357fdbad
{% macro title(fmt) %}
{{ course.title }} ({{ fmt.description }}) — Video AG, FSMPI
{{ course.title|e }} ({{ course.semester|semester }}, {{ fmt.description }}) — Video AG, FSMPI
{%- endmacro %}
{% macro course_description() %}
{{ course.semester|semester(long=True) }}, Veranstalter: {{ course.organizer }}
<p>{{ course.description|fixnl }}</p>
{%- endmacro %}
{% macro item_description(item) %}
{{ item.time|fulldate }}{% if item.speaker %} mit {{ item.speaker }}{% endif %}
<p>{{ item.comment|fixnl }}</p>
{%- if chapters|selectattr('lecture_id','equalto',item.id)|list %}
<ul>
{% for chapter in chapters|selectattr('lecture_id','equalto',item.id) %}
<li>{{ '%02d:%02d:%02d'|format( chapter.time//3600, (chapter.time//60)%60, chapter.time%60) }}: {{ chapter.text }}</li>
{% endfor %}
</ul>
{% endif %}
{%- endmacro %}
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:psc="http://podlove.org/simple-chapters" version="2.0">
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:psc="http://podlove.org/simple-chapters" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>{{ title(format) }}</title>
<link>{{ url_for('course', handle=course.handle, _external=True) }}</link>
<description><![CDATA[{{ course.description }}]]></description>
<generator>Website der Video AG (+https://git.fsmpi.rwth-aachen.de/videoaginfra/website)</generator>
<description>{{ course_description()|e }}</description>
<generator>Video AG-Website (+https://git.fsmpi.rwth-aachen.de/videoaginfra/website)</generator>
<category>{{ course.subject|e }}</category>
<image>
<url>{{ url_for('static', filename='logo.png', _external=True) }}</url>
<title>{{ title(format) }}</title>
<link>{{ url_for('course', handle=course.handle, _external=True) }}</link>
</image>
<webMaster>video@fsmpi.rwth-aachen.de (Video AG)</webMaster>
<atom:link rel="self" type="application/rss+xml" title="{{ title(format) }}" href="{{ url_for('rss_feed', handle=course.handle, format_id=format.id, _external=True) }}"/>
{% for fmt in formats %}
{% if fmt.id != format.id %}
......@@ -21,11 +39,15 @@
{% endfor %}
{% for item in items %}
<item>
<title>{{ item.title }}</title>
<title>{{ item.title|e }}</title>
<link>{{ url_for('lecture', id=item.id, course=course.handle, _external=True) }}</link>
<pubDate>{{ item.updated|rfc822 }}</pubDate>
<guid>video.fsmpi.rwth-aachen.de:{{ item.video.id }}</guid>
<description><![CDATA[{{ item.comment|e }}]]></description>
<guid isPermaLink="false">video.fsmpi.rwth-aachen.de:{{ item.video.id }}</guid>
<description>{{ item_description(item)|e }}</description>
<dc:creator>{{ course.organizer|e }}</dc:creator>
{% if item.speaker and item.speaker != course.organizer %}
<dc:creator>{{ item.speaker|e }}</dc:creator>
{% endif %}
<psc:chapters xmlns:psc="http://podlove.org/simple-chapters" version="1.2">
{% for chapter in chapters|selectattr('lecture_id','equalto',item.id) %}
<psc:chapter start="{{ chapter.time }}" title="{{ chapter.text }}"/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment