Hier kommen Radio-Seite und Podcast-Feed
resource/. -> resource/@url auch in ATOM und RSS git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@614 31f61c52-7bfb-0310-b897-fc00f8a278f0ds2013
parent
2e1d1be9d4
commit
6117ecbdc2
5
Makefile
5
Makefile
|
@ -51,7 +51,7 @@ PAGES:=$(patsubst content/pages/%.xml, build/%.html, $(wildcard content/pages/*.
|
|||
# Seiten zu einzelnen News-Items:
|
||||
NEWS_PAGES:=$(patsubst content/news/%.xml, build/news/%.html, $(wildcard content/news/*.xml))
|
||||
# News-Index und Feeds:
|
||||
NEWSFILES:=build/news.html build/news-rss.xml build/news-atom.xml build/xcal.xml build/ical.ics
|
||||
NEWSFILES:=build/news.html build/news-rss.xml build/news-atom.xml build/xcal.xml build/ical.ics build/podcast.xml
|
||||
# Datenspuren-Seiten:
|
||||
DS_PAGES:=$(patsubst content/datenspuren/%.xml, build/datenspuren/%.html, $(wildcard content/datenspuren/*.xml)) build/datenspuren/schedule.html
|
||||
# Suchseiten-Template
|
||||
|
@ -92,6 +92,9 @@ build/xcal.xml : STYLE=xsl/xcal.xsl
|
|||
build/ical.ics : STYLE=xsl/ical.xsl
|
||||
build/ical.ics : NOVALID_IGNORE:=true
|
||||
build/ical.ics : VFLAGS_OUT=--noout
|
||||
build/podcast.xml : STYLE=xsl/podcast.xsl
|
||||
build/podcast.xml : NOVALID_IGNORE:=true
|
||||
build/podcast.xml : VFLAGS_OUT=--noout --schema xsd/rss20.xsd
|
||||
|
||||
#.INTERMEDIATE: news.xml
|
||||
news.xml: $(NEWSITEMS)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<file>treff</file>
|
||||
<file>themenabende</file>
|
||||
<file>events</file>
|
||||
<file>radio</file>
|
||||
<file>projekte</file>
|
||||
<file>wiki</file>
|
||||
<file>silc</file>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE page SYSTEM "http://www.c3d2.de/dtd/c3d2web.dtd">
|
||||
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||
|
||||
<page title="Pentaradio" pagetitle="(((c3d2))) Pentaradio 24">
|
||||
<p>
|
||||
Pentaradio sind unregelmäßige Sendungen auf <link href="http://www.coloradio.org/">coloRadio</link>, bestehend aus einem informativen Rahmenprogramm und Beiträgen zu einem sendungsspezifischen Thema.
|
||||
</p>
|
||||
<p>
|
||||
Die Feeds der C3D2-News (<link href="news-rss.xml">RSS</link>, <link href="news-atom.xml">ATOM</link>) beinhalten die Mitschnitte als Podcasts.
|
||||
Daneben gibt es noch einen <link href="podcast.xml">Podcast-Feed</link>, der je nach Verfügbarkeit die MP3-Versionen enthält.
|
||||
Dieser ist insbesondere für Benutzer der proprietären iTunes-/iPod-Systeme geeignet.
|
||||
</p>
|
||||
|
||||
<!-- Falls irgendwann die 24 nicht mehr gemocht wird -->
|
||||
<news-list prefix="pentaradio-" details="resources-only"/>
|
||||
|
||||
<news-list prefix="pentaradio24-" details="resources-only"/>
|
||||
</page>
|
|
@ -77,7 +77,7 @@
|
|||
<xsl:for-each select="resource">
|
||||
<link
|
||||
rel="enclosure"
|
||||
href="{translate(., ' ', '+')}"
|
||||
href="{translate(@url, ' ', '+')}"
|
||||
type="{@type}"
|
||||
length="{@size}"
|
||||
/>
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Spezifikation:
|
||||
http://www.apple.com/itunes/store/podcaststechspecs.html
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:date="http://exslt.org/dates-and-times"
|
||||
exclude-result-prefixes="xsl date">
|
||||
|
||||
<xsl:output method="xml"
|
||||
version="1.0"
|
||||
encoding="utf-8"
|
||||
indent="yes"/>
|
||||
|
||||
<xsl:include href="date.xsl" />
|
||||
|
||||
<xsl:variable name="baseurl">https://www.c3d2.de/</xsl:variable>
|
||||
|
||||
<xsl:template match="news">
|
||||
<rss version="2.0">
|
||||
|
||||
<channel>
|
||||
<title>C3D2 Podcast</title>
|
||||
<link><xsl:value-of select="$baseurl"/>radio.html</link>
|
||||
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
|
||||
<description>Pentaradio als MP3</description>
|
||||
<itunes:subtitle>Pentaradio als MP3</itunes:subtitle>
|
||||
<itunes:summary>Radio vom CCC Dresden</itunes:summary>
|
||||
<language>de</language>
|
||||
<itunes:image href="{$baseurl}images/ck.png" />
|
||||
<itunes:category text="Talk">
|
||||
<itunes:category text="Radio"/>
|
||||
</itunes:category>
|
||||
|
||||
<xsl:for-each select="newsfile">
|
||||
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
|
||||
<!--xsl:if test="position() <= 10"-->
|
||||
<xsl:if test="count(document(.)/item/resource) > 0">
|
||||
|
||||
<xsl:apply-templates select="document(.)/item">
|
||||
<xsl:with-param name="newsfile" select="."/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</channel>
|
||||
|
||||
</rss>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="newsfile"/>
|
||||
<item>
|
||||
<xsl:variable name="href">
|
||||
<xsl:value-of select="$baseurl"/>
|
||||
<xsl:value-of select="substring-before(substring-after($newsfile, 'content/'), '.xml')"/>
|
||||
<xsl:text>.html</xsl:text>
|
||||
</xsl:variable>
|
||||
|
||||
<title><xsl:value-of select="@title"/></title>
|
||||
<link><xsl:value-of select="$href"/></link>
|
||||
<author><xsl:value-of select="@author"/></author>
|
||||
|
||||
<guid isPermaLink="true"><xsl:value-of select="$href"/></guid>
|
||||
|
||||
<pubDate>
|
||||
<xsl:call-template name="date-to-rfc822">
|
||||
<xsl:with-param name="date" select="@date"/>
|
||||
</xsl:call-template>
|
||||
</pubDate>
|
||||
|
||||
<xsl:apply-templates select="resource" mode="preselect"/>
|
||||
|
||||
</item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="resource" mode="preselect">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(alternative[@type='audio/mpeg']) > 0">
|
||||
<xsl:apply-templates test="alternative[@type='audio/mpeg'][1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*[name(.) = 'resource' or name(.) = 'alternative']">
|
||||
<enclosure
|
||||
url="{translate(@url, ' ', '+')}"
|
||||
length="{@size}"
|
||||
type="{@type}"
|
||||
/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -78,7 +78,7 @@
|
|||
-->
|
||||
<xsl:for-each select="resource">
|
||||
<enclosure
|
||||
url="{translate(., ' ', '+')}"
|
||||
url="{translate(@url, ' ', '+')}"
|
||||
length="{@size}"
|
||||
type="{@type}"
|
||||
/>
|
||||
|
|
|
@ -306,7 +306,7 @@
|
|||
<xsl:variable name="newsfile" select="."/>
|
||||
|
||||
<xsl:for-each select="document(concat('../', $newsfile))/item">
|
||||
<xsl:if test="(string-length($prefix) = 0) or starts-with($newsfile, concat('content/news/', $prefix))">
|
||||
<xsl:if test="((string-length($prefix) = 0) or starts-with($newsfile, concat('content/news/', $prefix))) and (($details != 'resources-only') or (count(resource) > 0))">
|
||||
|
||||
<div>
|
||||
<xsl:if test="($details = 'event') and event">
|
||||
|
@ -324,6 +324,11 @@
|
|||
<xsl:when test="$details = 'news'">
|
||||
<xsl:call-template name="news-meta"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$details = 'resources-only'">
|
||||
<xsl:call-template name="include-resources">
|
||||
<xsl:with-param name="include-hidden">yes</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="($details = 'event') and event">
|
||||
<ul class="details_event">
|
||||
<li>
|
||||
|
|
Loading…
Reference in New Issue