datenspuren.de/{2010,2011}/mitschnitte-rss.xml

Für Bitlove.org :-)
This commit is contained in:
Astro 2012-11-05 00:22:54 +01:00
parent 5860735620
commit 0a5795845d
2 changed files with 99 additions and 2 deletions

View File

@ -51,7 +51,7 @@ DS_SCHEDULE=$(wildcard content/static/datenspuren/$(DS_YEAR)/fahrplan/day_*.html
DATESTAMP=build/.stamp-$(shell date +%Y-%m-%d) DATESTAMP=build/.stamp-$(shell date +%Y-%m-%d)
# Dateinamen der zu erzeugenden html-Dateien: # Dateinamen der zu erzeugenden html-Dateien:
CONTENT=$(PAGES) $(NEWS_PAGES) $(DS_PAGES) $(NEWSFILES) build/calendar.html CONTENT=$(PAGES) $(NEWS_PAGES) $(DS_PAGES) $(DS_FEEDS) $(NEWSFILES) build/calendar.html
# 'normale' Seiten: # 'normale' Seiten:
PAGES:=$(patsubst content/pages/%.xml, build/%.html, $(wildcard content/pages/*.xml)) PAGES:=$(patsubst content/pages/%.xml, build/%.html, $(wildcard content/pages/*.xml))
@ -71,10 +71,11 @@ PLAYLISTS:=$(patsubst content/news/pentaradio%.xml, build/news/pentaradio%.xspf,
$(patsubst content/news/pentaradio%.xml, build/news/pentaradio%.m3u, $(wildcard content/news/pentaradio*.xml)) $(patsubst content/news/pentaradio%.xml, build/news/pentaradio%.m3u, $(wildcard content/news/pentaradio*.xml))
# Datenspuren-Seiten: # Datenspuren-Seiten:
DS_PAGES:=$(patsubst content/datenspuren/%.xml, build/datenspuren/$(DS_YEAR)/%.html, $(wildcard content/datenspuren/*.xml)) DS_PAGES:=$(patsubst content/datenspuren/%.xml, build/datenspuren/$(DS_YEAR)/%.html, $(wildcard content/datenspuren/*.xml))
DS_FEEDS:=build/datenspuren/2010/mitschnitte-rss.xml build/datenspuren/2011/mitschnitte-rss.xml
# Quellen # Quellen
NEWSITEMS:=$(wildcard content/news/*.xml) NEWSITEMS:=$(wildcard content/news/*.xml)
CLEAN=$(CONTENT) $(NEWSFILES) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DS_PAGES) CLEAN=$(CONTENT) $(NEWSFILES) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DS_PAGES) $(DS_FEEDS)
NOVALID:=false NOVALID:=false
@ -218,6 +219,14 @@ build/datenspuren/$(DS_YEAR)/news-atom.xml : NOVALID:=true
build/datenspuren/$(DS_YEAR)/news-atom.xml : PFLAGS+=--stringparam prefix ds12- build/datenspuren/$(DS_YEAR)/news-atom.xml : PFLAGS+=--stringparam prefix ds12-
build/datenspuren/$(DS_YEAR)/news-atom.xml : VFLAGS_OUT=$(VFLAGS) --relaxng xsd/atom.rng build/datenspuren/$(DS_YEAR)/news-atom.xml : VFLAGS_OUT=$(VFLAGS) --relaxng xsd/atom.rng
build/datenspuren/%/mitschnitte-rss.xml : STYLE=xsl/newsfile-to-podcast.xsl
build/datenspuren/%/mitschnitte-rss.xml : VFLAGS_OUT=$(VFLAGS) --schema xsd/rss20.xsd
build/datenspuren/2010/mitschnitte-rss.xml: content/news/ds10-videomitschnitte-komplett.xml $(STYLE)
$(call xml_process)
build/datenspuren/2011/mitschnitte-rss.xml: content/news/ds11-mitschnitte-online.xml $(STYLE)
$(call xml_process)
xhtml5-validate: $(patsubst build/%.html, build/%.html.xhtml5-validate, $(CONTENT)) xhtml5-validate: $(patsubst build/%.html, build/%.html.xhtml5-validate, $(CONTENT))
build/%.html.xhtml5-validate: build/%.html build/%.html.xhtml5-validate: build/%.html
./scripts/validate_xhtml5.sh $< ./scripts/validate_xhtml5.sh $<

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
exclude-result-prefixes="xsl">
<xsl:output method="xml"
version="1.0"
encoding="utf-8"
indent="yes"/>
<xsl:include href="common.xsl" />
<xsl:variable name="baseurl">http://www.c3d2.de/</xsl:variable>
<xsl:template match="item">
<rss version="2.0">
<channel>
<title><xsl:value-of select="@title"/></title>
<link><xsl:value-of select="$baseurl"/></link>
<description><xsl:value-of select="@title"/></description>
<language>de</language>
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
<xsl:apply-templates select="image"/>
<itunes:author>Chaos Computer Club Dresden</itunes:author>
<itunes:owner>
<itunes:name>C3D2</itunes:name>
<itunes:email>mail@c3d2.de</itunes:email>
</itunes:owner>
<xsl:apply-templates select="*[name() = 'resource' or name() = 'addendum']"/>
</channel>
</rss>
</xsl:template>
<xsl:template match="image">
<image>
<title><xsl:value-of select="@title"/></title>
<url><xsl:value-of select="concat($baseurl, 'news/', string(.))"/></url>
<link><xsl:value-of select="$baseurl"/></link>
</image>
</xsl:template>
<xsl:template match="addendum">
<xsl:apply-templates select="resource"/>
</xsl:template>
<xsl:template match="resource">
<item>
<title><xsl:value-of select="@title"/></title>
<xsl:if test="@feedback-link">
<link><xsl:value-of select="@feedback-link"/></link>
</xsl:if>
<xsl:apply-templates select="." mode="generate-enclosures"/>
<guid isPermaLink="false"><xsl:value-of select="concat(@feedback-link, '+++', @url, alternative/@url)"/></guid>
<pubDate>
<xsl:call-template name="date-to-rfc822">
<xsl:with-param name="date" select="/item/@date"/>
</xsl:call-template>
</pubDate>
<xsl:if test="@poster">
<itunes:image href="{@poster}"/>
</xsl:if>
</item>
</xsl:template>
<xsl:template match="*[name() = 'resource' or name() = 'alternative']"
mode="generate-enclosures">
<enclosure
url="{@url}"
length="{@size}"
type="{@type}"
/>
<xsl:apply-templates mode="generate-enclosures"/>
</xsl:template>
<xsl:template match="*"
mode="generate-enclosures">
</xsl:template>
</xsl:stylesheet>