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: # Seiten zu einzelnen News-Items:
NEWS_PAGES:=$(patsubst content/news/%.xml, build/news/%.html, $(wildcard content/news/*.xml)) NEWS_PAGES:=$(patsubst content/news/%.xml, build/news/%.html, $(wildcard content/news/*.xml))
# News-Index und Feeds: # 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 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)) \ 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)) \ $(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 : NOVALID_IGNORE:=true
build/podcast.xml : VFLAGS_OUT=$(VFLAGS) --schema xsd/rss20.xsd build/podcast.xml : VFLAGS_OUT=$(VFLAGS) --schema xsd/rss20.xsd
build/podcast.xml: xsl/podcast.xsl # Does not work with $(STYLE) - why? 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 #.INTERMEDIATE: news.xml
news.xml: $(NEWSITEMS) news.xml: $(NEWSITEMS)

View File

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