podcast.xml mit zusätzlich pentaradio.xml & pentacast.xml

git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@2189 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2009-10-25 12:45:19 +00:00
parent 13575e1a51
commit 2b859d2a7a
2 changed files with 79 additions and 21 deletions

View File

@ -55,7 +55,8 @@ 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/podcast.xml \
NEWSFILES:=build/news.html build/news-rss.xml build/news-atom.xml \
build/podcast.xml build/pentaradio.xml build/pentacast.xml \
build/ical.ics build/xcal.xml build/reminders build/datenspuren/news-rss.xml build/datenspuren/news-atom.xml
PLAYLISTS:=$(patsubst content/news/pentaradio%.xml, build/news/pentaradio%.xspf, $(wildcard content/news/pentaradio*.xml)) \
$(patsubst content/news/pentaradio%.xml, build/news/pentaradio%.pls, $(wildcard content/news/pentaradio*.xml)) \
@ -109,6 +110,16 @@ build/podcast.xml : STYLE=xsl/podcast.xsl
build/podcast.xml : NOVALID_IGNORE:=true
build/podcast.xml : VFLAGS_OUT=$(VFLAGS) --schema xsd/rss20.xsd
build/podcast.xml: xsl/podcast.xsl # Does not work with $(STYLE) - why?
build/pentaradio.xml : STYLE=xsl/podcast.xsl
build/pentaradio.xml : NOVALID_IGNORE:=true
build/pentaradio.xml : VFLAGS_OUT=$(VFLAGS) --schema xsd/rss20.xsd
build/pentaradio.xml : PFLAGS+=--stringparam selection pentaradio
build/pentaradio.xml: xsl/podcast.xsl # Does not work with $(STYLE) - why?
build/pentacast.xml : STYLE=xsl/podcast.xsl
build/pentacast.xml : NOVALID_IGNORE:=true
build/pentacast.xml : VFLAGS_OUT=$(VFLAGS) --schema xsd/rss20.xsd
build/pentacast.xml : PFLAGS+=--stringparam selection pentacast
build/pentacast.xml: xsl/podcast.xsl # Does not work with $(STYLE) - why?
#.INTERMEDIATE: news.xml
news.xml: $(NEWSITEMS)

View File

@ -18,14 +18,18 @@
<xsl:include href="common.xsl" />
<xsl:variable name="baseurl">http://www.c3d2.de/</xsl:variable>
<xsl:param name="selection" select="''"/>
<xsl:template match="news">
<rss version="2.0">
<xsl:message>selection: '<xsl:value-of select="$selection"/>'</xsl:message>
<channel>
<xsl:choose>
<xsl:when test="$selection = 'pentaradio'">
<title>Pentaradio</title>
<link><xsl:value-of select="$baseurl"/>radio.html</link>
<description>C3D2 Podcast</description>
<description>C3D2 Pentaradio</description>
<language>de</language>
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
<itunes:subtitle>Radio vom CCC Dresden</itunes:subtitle>
@ -33,24 +37,67 @@
Pentaradio sind die Sendungen des Chaos Computer Club Dresden auf coloRadio, bestehend aus einem informativen Rahmenprogramm und Beiträgen zu einem sendungsspezifischen Thema.
</itunes:summary>
<itunes:image href="{$baseurl}images/pentaradio.png" />
</xsl:when>
<xsl:when test="$selection = 'pentacast'">
<title>Pentacast</title>
<link><xsl:value-of select="$baseurl"/>podcast.html</link>
<description>C3D2 Pentacast</description>
<language>de</language>
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
<itunes:subtitle>Podcasts vom CCC Dresden</itunes:subtitle>
<itunes:summary>
Pentacast sind themenspezifische Sendungen des Chaos
Computer Club Dresden.
</itunes:summary>
<itunes:image href="{$baseurl}images/pentacast.png" />
</xsl:when>
<xsl:otherwise>
<title>C3D2 Podcast</title>
<link><xsl:value-of select="$baseurl"/></link>
<description>C3D2 Podcast</description>
<language>de</language>
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
<itunes:subtitle>Radio &amp; Podcasts vom CCC Dresden</itunes:subtitle>
<itunes:summary>
Pentaradio &amp; Pentacast vom Chaos Computer Club Dresden.
</itunes:summary>
<itunes:image href="{$baseurl}images/pentaradio.png" />
</xsl:otherwise>
</xsl:choose>
<itunes:category text="Society &amp; culture"/>
<itunes:category text="Talk">
<itunes:category text="Radio"/>
</itunes:category>
<itunes:category text="Technology"/>
<itunes:author>Chaos Computer Club Dresden</itunes:author>
<xsl:for-each select="newsfile">
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
<!--xsl:if test="position() &lt;= 10"-->
<xsl:if test="(starts-with(., 'content/news/pentaradio') or
starts-with(., 'content/news/pentacast')) and
(count(document(.)/item/resource) &gt; 0)">
<xsl:choose>
<xsl:when test="$selection = 'pentaradio'">
<xsl:if test="starts-with(., 'content/news/pentaradio') and
count(document(.)/item/resource) &gt; 0">
<xsl:apply-templates select="document(.)/item/resource" mode="preselect">
<xsl:with-param name="newsfile" select="."/>
</xsl:apply-templates>
</xsl:if>
</xsl:when>
<xsl:when test="$selection = 'pentacast'">
<xsl:if test="starts-with(., 'content/news/pentacast') and
count(document(.)/item/resource) &gt; 0">
<xsl:apply-templates select="document(.)/item/resource" mode="preselect">
<xsl:with-param name="newsfile" select="."/>
</xsl:apply-templates>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="count(document(.)/item/resource) &gt; 0">
<xsl:apply-templates select="document(.)/item/resource" mode="preselect">
<xsl:with-param name="newsfile" select="."/>
</xsl:apply-templates>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</channel>