From 1d6ab9c561c24f56b9e6d1a81652d4b021e526b1 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 30 Mar 2021 23:54:01 +0200 Subject: [PATCH] add podcast xml meta data --- assets/css/xml.css | 122 ++++++++++++++++++++++++++ assets/images/wtf_podcast_logo.png | 3 + content/podcast/contents.lr | 18 +++- content/wtf-ogg.xml/contents.lr | 5 ++ content/wtf.xml/contents.lr | 5 ++ templates/podcastfeed.xml | 132 +++++++++++++++++++++++++++++ 6 files changed, 282 insertions(+), 3 deletions(-) create mode 100644 assets/css/xml.css create mode 100644 assets/images/wtf_podcast_logo.png create mode 100644 content/wtf-ogg.xml/contents.lr create mode 100644 content/wtf.xml/contents.lr create mode 100644 templates/podcastfeed.xml diff --git a/assets/css/xml.css b/assets/css/xml.css new file mode 100644 index 0000000..dd20295 --- /dev/null +++ b/assets/css/xml.css @@ -0,0 +1,122 @@ +/* this custom CSS stylesheet + is under the MIT license + MIT (C) 2020 by L3D + + 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; +} diff --git a/assets/images/wtf_podcast_logo.png b/assets/images/wtf_podcast_logo.png new file mode 100644 index 0000000..2ee2f9a --- /dev/null +++ b/assets/images/wtf_podcast_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d358c44d07a1f72fcb29603c591a80cd33937a7236f470712ab2b04b77432636 +size 27016 diff --git a/content/podcast/contents.lr b/content/podcast/contents.lr index 88d74cd..b566512 100644 --- a/content/podcast/contents.lr +++ b/content/podcast/contents.lr @@ -1,5 +1,17 @@ -_model: page +_model: podcast --- -title: Podcast +title: WTF eG Podcast --- -body: Hier findest du die aktuellen Folgen des WTF-Podcasts: vebit.xyz/podcast +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 diff --git a/content/wtf-ogg.xml/contents.lr b/content/wtf-ogg.xml/contents.lr new file mode 100644 index 0000000..187edd4 --- /dev/null +++ b/content/wtf-ogg.xml/contents.lr @@ -0,0 +1,5 @@ +_template: podcastfeed.xml +--- +_model: none +_discoverable: no +_hidden: yes diff --git a/content/wtf.xml/contents.lr b/content/wtf.xml/contents.lr new file mode 100644 index 0000000..187edd4 --- /dev/null +++ b/content/wtf.xml/contents.lr @@ -0,0 +1,5 @@ +_template: podcastfeed.xml +--- +_model: none +_discoverable: no +_hidden: yes diff --git a/templates/podcastfeed.xml b/templates/podcastfeed.xml new file mode 100644 index 0000000..877fd17 --- /dev/null +++ b/templates/podcastfeed.xml @@ -0,0 +1,132 @@ +{#- +License: MIT +(C)2020 by L3D +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' -%} + + +{#- custom CSS fuer das XML... -#} +{% if '/css/xml.css'|asseturl is defined -%} + +{%- endif %} + + + + {{ podcasttitle }} + {{ '/'|url(external=true) }}{{ search }}/ + + {{ podcastdescribtion }} + {%- if this.path == oggfeed -%} + Dieser Podcast wird als OGG Feed bereit gestellt. + {% else %} + Dieser Podcast wird als MP3 Feed bereit gestellt. + {% endif %} + + + + {{ podcastlogassetimagepath|url(external=true) }}{{ podcasttitle }}{{ '/'|url(external=true) }}{{ search }}/ + + + {{ podcastauthor }} + Von Hand als Jinja2 Template von L3D geschrieben + {{ podcastauthor }} + serial + + {{ podcastsummary }} + + + {{ podcastauthor }} + {{ podcastemail }} + + + + + + + {{ podcastsubtitle }} + no + + Sun, 12 Apr 2020 11:42:23 +0000 + {{ podcastlanguage }} + © 2020 {{ podcastauthor }} + {{ podcastxml|url(external=true) }} + + {{ podcastkeywords }} + + {{ podcastxml|url(external=true) }} + {{ podcastkategory }} + {%- set pages = site.query( '/podcast' ).include_undiscoverable(true).all() -%} + {%- set firstrun = true %} + {%- for page in pages -%} + {%- if not page._hidden %} + + {{ page.title }} + {{ '/'|url(external=true) }}{{ search }}/{{ page._id }}/ + {% 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 %} + {% 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 %} + {{ page.pub_date|datetimeformat('ccc, dd MMM YYYY hh:mm:ss Z', 'UTC', locale='en_US') }} + {{ page.duration }} + WAFFEL+{{ page._id }}-{{ page.pub_date|datetimeformat('YYYYMMddhhmmss') }}-L3D + + + + {{ page.podcast_teaser }} + {{ page.title }} + {{ page.season }} + {{ page.episode }} + full + + no + +

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 {{ podcastemail }} empfangen zu dürfen!

]]>
+ +{#- + + *KAPITEL DERZEIT (noch) nicht implementiert...* + Sie sollten aber in etwa so aussehen... + + + + + + + + + +-#} + +{%- if page.authors %}{% for author in page.authors.split(",") %}{{ author }}{% endfor %}{%- else %}{{ podcastauthor }}{%- endif %} +
+ {%- endif %} + {%- endfor %} +
+