forked from ag_kommunikation/webseite
add podcast xml meta data
This commit is contained in:
parent
b18f0973cf
commit
1d6ab9c561
122
assets/css/xml.css
Normal file
122
assets/css/xml.css
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
/* this custom CSS stylesheet
|
||||||
|
is under the MIT license
|
||||||
|
MIT (C) 2020 by L3D <l3d@c3woc.de>
|
||||||
|
|
||||||
|
this stylesheet has the purpose
|
||||||
|
to make the Podcast XML Feed more
|
||||||
|
attractive and graphically enhance it.
|
||||||
|
*/
|
||||||
|
channel {
|
||||||
|
display:block;
|
||||||
|
border: 1px solid gray;
|
||||||
|
margin:0.5em;
|
||||||
|
padding:0.5em;
|
||||||
|
background-color:whitesmoke;
|
||||||
|
list-style: none;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
channel:before {
|
||||||
|
content: 'Podcast Feed für deinen Podcast Client';
|
||||||
|
color: green;
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
lastBuildDate:before {
|
||||||
|
content: "Füge diesen XML Feed in deinen Podcatcher ein um den Podcast zu abonnieren!";
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
display: block;
|
||||||
|
color: forestgreen;
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
lastBuildDate {
|
||||||
|
color: rgba(245, 245, 245, 0);
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
item {
|
||||||
|
display:block;
|
||||||
|
border: 1px solid silver;
|
||||||
|
margin:0.5em;
|
||||||
|
padding:0.5em;
|
||||||
|
background-color:whitesmoke;
|
||||||
|
}
|
||||||
|
title {
|
||||||
|
display:block;
|
||||||
|
color: #ee7402;
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
title:before,
|
||||||
|
.itunes_subtitle:after,
|
||||||
|
description:after,
|
||||||
|
.itunes_subtitle:before{
|
||||||
|
content: '\a';
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
title:after,
|
||||||
|
link:after,
|
||||||
|
download:after,
|
||||||
|
content:after,
|
||||||
|
content:before{
|
||||||
|
content: '\a \a ';
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
link,
|
||||||
|
download{
|
||||||
|
color: navy;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
download:before{ content: "Download: "; }
|
||||||
|
description{
|
||||||
|
color: #f94f22;
|
||||||
|
}
|
||||||
|
language:before{ content:"Language: "; }
|
||||||
|
language:after{ content:", Kategorie: "; }
|
||||||
|
description:before{
|
||||||
|
content: "\a \a Beschreibung: ";
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
id,
|
||||||
|
copyright,
|
||||||
|
generator,
|
||||||
|
updated,
|
||||||
|
pubDate,
|
||||||
|
guid,
|
||||||
|
description,
|
||||||
|
.itunes_summary,
|
||||||
|
.itunes_keywords,
|
||||||
|
.itunes_explicit,
|
||||||
|
.itunes_owner,
|
||||||
|
.itunes_new-feed-url,
|
||||||
|
.itunes_author,
|
||||||
|
.itunes_serial,
|
||||||
|
.episodeType,
|
||||||
|
.itunessummary,
|
||||||
|
.encoded { display: none; }
|
||||||
|
name { color:red; text-decoration: underline; }
|
||||||
|
price { color:green; }
|
||||||
|
stock { color:brown; }
|
||||||
|
country { color:blue; }
|
||||||
|
content {
|
||||||
|
color: #424242;
|
||||||
|
background-color: #ccc;
|
||||||
|
display:block;
|
||||||
|
border: 1px solid gray;
|
||||||
|
margin:1em;
|
||||||
|
margin-right: 12em;
|
||||||
|
padding:0.5em;
|
||||||
|
background-color: #ccc;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
.itunes_block {
|
||||||
|
content: '\a\a\a\a\a\a\a\a\a\a';
|
||||||
|
padding: 64px;
|
||||||
|
float: right;
|
||||||
|
margin: 4px;
|
||||||
|
background: url("/images/wtf_podcast_logo.png") no-repeat;
|
||||||
|
color: rgba(0,0,0,0);
|
||||||
|
}
|
||||||
|
.itunes_subtitle { font-size: 70%;}
|
||||||
|
channel:after {
|
||||||
|
content: 'Das Stylesheet und der XML Feed wurde von L3D für den Podcastfeed erstellt und steht unter der MIT License. Über Feedback hierzu würde L3D sich freuen... --> https://chaos.social/@l3d';
|
||||||
|
color: gray;
|
||||||
|
font-size: 7pt;
|
||||||
|
}
|
BIN
assets/images/wtf_podcast_logo.png
(Stored with Git LFS)
Normal file
BIN
assets/images/wtf_podcast_logo.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,5 +1,17 @@
|
|||||||
_model: page
|
_model: podcast
|
||||||
---
|
---
|
||||||
title: Podcast
|
title: WTF eG Podcast
|
||||||
---
|
---
|
||||||
body: Hier findest du die aktuellen Folgen des WTF-Podcasts: <a href="https://vebit.xyz/podcast/" target="_blank">vebit.xyz/podcast</a>
|
description: Der Podcast der Werkkooperative der Technikfreundinnen e. G. i. G.
|
||||||
|
---
|
||||||
|
link: /wtf.xml
|
||||||
|
---
|
||||||
|
spruch: Podcast MP3 Feed
|
||||||
|
---
|
||||||
|
enable: yes
|
||||||
|
---
|
||||||
|
enable2: yes
|
||||||
|
---
|
||||||
|
link2: /wtf-ogg.xml
|
||||||
|
---
|
||||||
|
spruch2: Podcast OGG Feed
|
||||||
|
5
content/wtf-ogg.xml/contents.lr
Normal file
5
content/wtf-ogg.xml/contents.lr
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
_template: podcastfeed.xml
|
||||||
|
---
|
||||||
|
_model: none
|
||||||
|
_discoverable: no
|
||||||
|
_hidden: yes
|
5
content/wtf.xml/contents.lr
Normal file
5
content/wtf.xml/contents.lr
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
_template: podcastfeed.xml
|
||||||
|
---
|
||||||
|
_model: none
|
||||||
|
_discoverable: no
|
||||||
|
_hidden: yes
|
132
templates/podcastfeed.xml
Normal file
132
templates/podcastfeed.xml
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{#-
|
||||||
|
License: MIT
|
||||||
|
(C)2020 by L3D <l3d@c3woc.de>
|
||||||
|
Source: https://github.com/c3woc/c3woc-podcast.git
|
||||||
|
-#}
|
||||||
|
{%- set search = "podcast" -%}
|
||||||
|
{%- set podcasttitle = "WTF Kooperative eG Podcast" -%}
|
||||||
|
{%- set podcastdescribtion = "Der Podcast der WTF Kooperative eG - Werkkooperative der Technikfreundinnen" -%}
|
||||||
|
{%- set podcastsubtitle = "Der Podcast der WTF Kooperative eG - Werkkooperative der Technikfreundinnen" -%}
|
||||||
|
{%- set podcastsummary = "Der Podcast der WTF Kooperative eG - Werkkooperative der Technikfreundinnen" -%}
|
||||||
|
{%- set podcastauthor = "WTF Kooperative eG, Vebit e.V. and Members" -%}
|
||||||
|
{%- set podcastemail = "vorstand@wtf-eg.de" -%}
|
||||||
|
{%- set podcastxml = "/wtf.xml" -%}
|
||||||
|
{%- set podcastkeywords = "WTF, Hacker, CCC, COOP, Genossenschaft" -%}
|
||||||
|
{%- set podcastkategory = "Technology" -%}
|
||||||
|
{%- set podcastlanguage = "de-DE" -%}
|
||||||
|
{%- set podcastlogassetimagepath = "/images/wtf_podcast_logo.png" -%}
|
||||||
|
{#- Make sure you set the the correct property for mp3 and ogg feed!
|
||||||
|
For MP3 Feed set the path for the xml file to the mp3feed variable.
|
||||||
|
Same procedure for ogg and the oggfeed variable -#}
|
||||||
|
{%- set mp3feed = '/wtf.xml' -%}
|
||||||
|
{%- set oggfeed = '/wtf-ogg.xml' -%}
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
{#- custom CSS fuer das XML... -#}
|
||||||
|
{% if '/css/xml.css'|asseturl is defined -%}
|
||||||
|
<?xml-stylesheet href="{{ '/css/xml.css'|asseturl }}" type="text/css" ?>
|
||||||
|
{%- endif %}
|
||||||
|
<rss version="2.0"
|
||||||
|
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||||
|
xmlns:georss="http://www.georss.org/georss"
|
||||||
|
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
|
||||||
|
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
|
||||||
|
xmlns:psc="http://podlove.org/simple-chapters"
|
||||||
|
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
|
xmlns:fh="http://purl.org/syndication/history/1.0" >
|
||||||
|
<channel>
|
||||||
|
<!-- essential to RSS spec https://www.rssboard.org/rss-specification -->
|
||||||
|
<title type="text">{{ podcasttitle }}</title>
|
||||||
|
<link>{{ '/'|url(external=true) }}{{ search }}/</link>
|
||||||
|
<description>
|
||||||
|
{{ podcastdescribtion }}
|
||||||
|
{%- if this.path == oggfeed -%}
|
||||||
|
Dieser Podcast wird als OGG Feed bereit gestellt.
|
||||||
|
{% else %}
|
||||||
|
Dieser Podcast wird als MP3 Feed bereit gestellt.
|
||||||
|
{% endif %}
|
||||||
|
</description>
|
||||||
|
<!-- optional to RSS spec -->
|
||||||
|
<!--lastBuildDate>{ { none|datetimeformat('ccc, dd MMM YYYY hh:mm:ss Z', 'UTC', locale='en_US') } }</lastBuildDate--><!-- todo: implement / use plugin for time_modified (e.g. Lektor-Git-Timestamp) -->
|
||||||
|
<image><url>{{ podcastlogassetimagepath|url(external=true) }}</url><title>{{ podcasttitle }}</title><link>{{ '/'|url(external=true) }}{{ search }}/</link></image>
|
||||||
|
<atom:link rel="self" type="application/rss+xml" title="{{ podcasttitle }}" href="{{ podcastxml|url(external=true) }}" />
|
||||||
|
<atom:link rel="first" type="application/rss+xml" href="{{ podcastxml|url(external=true) }}" />
|
||||||
|
<atom:contributor><atom:name>{{ podcastauthor }}</atom:name></atom:contributor>
|
||||||
|
<generator>Von Hand als Jinja2 Template von L3D geschrieben</generator>
|
||||||
|
<itunes:author class="itunes_author">{{ podcastauthor }}</itunes:author>
|
||||||
|
<itunes:type class="itunes_serial">serial</itunes:type>
|
||||||
|
<itunes:summary class="itunessummary">
|
||||||
|
{{ podcastsummary }}
|
||||||
|
</itunes:summary>
|
||||||
|
<itunes:owner class="itunes_owner">
|
||||||
|
<itunes:name>{{ podcastauthor }}</itunes:name>
|
||||||
|
<itunes:email>{{ podcastemail }}</itunes:email>
|
||||||
|
</itunes:owner>
|
||||||
|
<itunes:image href="{{ podcastlogassetimagepath|url(external=true) }}" class="itunes_feed_image"/>
|
||||||
|
<itunes:category text="Education">
|
||||||
|
<itunes:category text="Technology"/>
|
||||||
|
<itunes:category text="Science"/>
|
||||||
|
</itunes:category>
|
||||||
|
<itunes:subtitle class="itunes_subtitle">{{ podcastsubtitle }}</itunes:subtitle>
|
||||||
|
<itunes:block class="itunes_block">no</itunes:block>
|
||||||
|
<!--updated>{ { none|datetimeformat('ccc, dd MMM YYYY hh:mm:ss Z', 'UTC', locale='en_US') } }</updated--><!-- see lastBuildDate -->
|
||||||
|
<pubDate>Sun, 12 Apr 2020 11:42:23 +0000</pubDate>
|
||||||
|
<language>{{ podcastlanguage }}</language>
|
||||||
|
<copyright>© 2020 {{ podcastauthor }}</copyright>
|
||||||
|
<id>{{ podcastxml|url(external=true) }}</id>
|
||||||
|
<itunes:keywords class="itunes_keywords">
|
||||||
|
{{ podcastkeywords }}
|
||||||
|
</itunes:keywords>
|
||||||
|
<itunes:new-feed-url class="itunes_new-feed-url">{{ podcastxml|url(external=true) }}</itunes:new-feed-url>
|
||||||
|
<itunes:category text="Technology">{{ podcastkategory }}</itunes:category>
|
||||||
|
{%- set pages = site.query( '/podcast' ).include_undiscoverable(true).all() -%}
|
||||||
|
{%- set firstrun = true %}
|
||||||
|
{%- for page in pages -%}
|
||||||
|
{%- if not page._hidden %}
|
||||||
|
<item>
|
||||||
|
<title>{{ page.title }}</title>
|
||||||
|
<link>{{ '/'|url(external=true) }}{{ search }}/{{ page._id }}/</link>
|
||||||
|
<author class="itunes_author">{% if page.authors %}{% for author in page.authors.split(",") %}{% if author == page.authors.split(",")[0] %}{% elif author == page.authors.split(",")[-1] %} und {% else %}, {% endif %}{{ author }}{% endfor %}{% else %}{{ podcastauthor }}{% endif %}</author>
|
||||||
|
<itunes:author>{% if page.authors %}{% for author in page.authors.split(",") %}{% if author == page.authors.split(",")[0] %}{% elif author == page.authors.split(",")[-1] %} und {% else %}, {% endif %}{{ author }}{% endfor %}{% else %}{{ podcastauthor }}{% endif %}</itunes:author>
|
||||||
|
<pubDate>{{ page.pub_date|datetimeformat('ccc, dd MMM YYYY hh:mm:ss Z', 'UTC', locale='en_US') }}</pubDate>
|
||||||
|
<itunes:duration>{{ page.duration }}</itunes:duration>
|
||||||
|
<guid isPermaLink="false">WAFFEL+{{ page._id }}-{{ page.pub_date|datetimeformat('YYYYMMddhhmmss') }}-L3D</guid>
|
||||||
|
<description><![CDATA[{{ page.feed_shownotes }}]]></description>
|
||||||
|
<atom:link href="{{ '/'|url(external=true) }}{{ search }}/{{ page._id }}/" />
|
||||||
|
<enclosure url="{{ '/'|url(external=true) }}{{ search }}/{{ page._id }}/
|
||||||
|
{%- if this.path == oggfeed -%}
|
||||||
|
{{ page.podcastogg }}" type="audio/ogg" length="{% if page.oggleng %}{{ page.oggleng }}{% else %}1337{% endif %}
|
||||||
|
{%- else -%}
|
||||||
|
{{ page.podcastmp3 }}" type="audio/mpeg" length="{% if page.mp3leng %}{{ page.mp3leng }}{% else %}1337{% endif %}
|
||||||
|
{%- endif -%}"/>
|
||||||
|
<itunes:subtitle>{{ page.podcast_teaser }}</itunes:subtitle>
|
||||||
|
<itunes:title>{{ page.title }}</itunes:title>
|
||||||
|
<itunes:season>{{ page.season }}</itunes:season>
|
||||||
|
<itunes:episode>{{ page.episode }}</itunes:episode>
|
||||||
|
<itunes:episodeType class="episodeType">full</itunes:episodeType>
|
||||||
|
<itunes:summary class="itunessummary"><![CDATA[{{ page.feed_shownotes }}]]></itunes:summary>
|
||||||
|
<itunes:explicit class="itunes_explicit">no</itunes:explicit>
|
||||||
|
<content:encoded class="encoded"><![CDATA[{{ page.feed_shownotes }}<br/>
|
||||||
|
<p>Vielen Dank für das anhören dieser {% if this.path == oggfeed %}OGG{% else %}MP3{% endif %} Podcastfolge. Wenn ihr Fragen oder Anmerkungen habt freuen wir uns sehr darüber diese auf <a href="mailto:{{ podcastemail }}">{{ podcastemail }}</a> empfangen zu dürfen!</p>]]></content:encoded>
|
||||||
|
|
||||||
|
{#-
|
||||||
|
|
||||||
|
*KAPITEL DERZEIT (noch) nicht implementiert...*
|
||||||
|
Sie sollten aber in etwa so aussehen...
|
||||||
|
|
||||||
|
<psc:chapters xmlns:psc="http://podlove.org/simple-chapters" version="1.2">
|
||||||
|
<psc:chapter start="00:00:00.000" title="Intro"/>
|
||||||
|
<psc:chapter start="00:01:55.003" title="Hallo"/>
|
||||||
|
<psc:chapter start="00:02:50.000" title="Welt"/>
|
||||||
|
<psc:chapter start="00:14:14.000" title="Die Waffel"/>
|
||||||
|
<psc:chapter start="00:23:42.000" title="Ende"/>
|
||||||
|
</psc:chapters>
|
||||||
|
|
||||||
|
-#}
|
||||||
|
|
||||||
|
{%- if page.authors %}{% for author in page.authors.split(",") %}<atom:contributor><atom:name>{{ author }}</atom:name></atom:contributor>{% endfor %}{%- else %}<atom:contributor><atom:name>{{ podcastauthor }}</atom:name></atom:contributor>{%- endif %}
|
||||||
|
</item>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
</channel>
|
||||||
|
</rss>
|
Loading…
Reference in New Issue
Block a user