handle torrent file links
This commit is contained in:
parent
b579a7fde9
commit
6bbd3d0867
6
data.xml
6
data.xml
|
@ -37,9 +37,13 @@
|
||||||
<link filesize="">pdfs/ds105.pdf</link>
|
<link filesize="">pdfs/ds105.pdf</link>
|
||||||
<link filesize="">epubs/ds105.epub</link>
|
<link filesize="">epubs/ds105.epub</link>
|
||||||
-->
|
-->
|
||||||
<link filesize="4710515">vorab/ds105_sticker.zip</link>
|
<!--
|
||||||
|
<link filesize="4710515">105/sticker.zip</link>
|
||||||
|
<link filesize="575">105/sticker.zip.torrent</link>
|
||||||
|
-->
|
||||||
<preface>editorial/ds105.html</preface>
|
<preface>editorial/ds105.html</preface>
|
||||||
<references>references/ds105.html</references>
|
<references>references/ds105.html</references>
|
||||||
|
<info date="Wed, 05 Oct 2022 13:37 +0000">Die Sticker zur Ausgabe #105 sind nun ebenfalls online verfügbar (<a href="magnet:?xt=urn:btih:1b80b75274e4c2a6b91f5320c4526bf8df48f8ed&dn=sticker.zip&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&ws=https%3A%2F%2Fds.ccc.de%2F105%2Fsticker.zip">Magnet-Link</a>, <a href="105/sticker.zip.torrent">Torrent-Datei</a>).</info>
|
||||||
<info date="Tue, 12 Jul 2022 07:23 +0000">Nach Anpassungen der LaTeX-Klasse für die Ausgabe von ePUB ist nun auch die schon länger in den Regalen stehende Ausgabe #103 online.</info>
|
<info date="Tue, 12 Jul 2022 07:23 +0000">Nach Anpassungen der LaTeX-Klasse für die Ausgabe von ePUB ist nun auch die schon länger in den Regalen stehende Ausgabe #103 online.</info>
|
||||||
</schleuder>
|
</schleuder>
|
||||||
<schleuder id="104" printonly="printonly">
|
<schleuder id="104" printonly="printonly">
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<xsl:when test="substring($link, string-length($link) - 3) = 'html'">html</xsl:when>
|
<xsl:when test="substring($link, string-length($link) - 3) = 'html'">html</xsl:when>
|
||||||
<xsl:when test="substring($link, string-length($link) - 2) = 'pdf'">pdf</xsl:when>
|
<xsl:when test="substring($link, string-length($link) - 2) = 'pdf'">pdf</xsl:when>
|
||||||
<xsl:when test="substring($link, string-length($link) - 2) = 'zip'">other</xsl:when>
|
<xsl:when test="substring($link, string-length($link) - 2) = 'zip'">other</xsl:when>
|
||||||
|
<xsl:when test="substring($link, string-length($link) - 6) = 'torrent'">other</xsl:when>
|
||||||
<xsl:otherwise>unknown</xsl:otherwise>
|
<xsl:otherwise>unknown</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
@ -166,6 +167,7 @@
|
||||||
<xsl:when test="substring($linkdata, string-length($linkdata) - 3) = 'epub'">epub</xsl:when>
|
<xsl:when test="substring($linkdata, string-length($linkdata) - 3) = 'epub'">epub</xsl:when>
|
||||||
<xsl:when test="substring($linkdata, string-length($linkdata) - 3) = 'html'">html</xsl:when>
|
<xsl:when test="substring($linkdata, string-length($linkdata) - 3) = 'html'">html</xsl:when>
|
||||||
<xsl:when test="substring($linkdata, string-length($linkdata) - 2) = 'zip'">other</xsl:when>
|
<xsl:when test="substring($linkdata, string-length($linkdata) - 2) = 'zip'">other</xsl:when>
|
||||||
|
<xsl:when test="substring($linkdata, string-length($linkdata) - 6) = 'torrent'">other</xsl:when>
|
||||||
<xsl:otherwise>unknown</xsl:otherwise>
|
<xsl:otherwise>unknown</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
|
@ -118,12 +118,12 @@ time { font-family: Arial, sans-serif; font-size: 10pt; }</xsl:text>
|
||||||
<xsl:for-each select="schleuder">
|
<xsl:for-each select="schleuder">
|
||||||
|
|
||||||
<xsl:if test="count(info)>0">
|
<xsl:if test="count(info)>0">
|
||||||
<xsl:element name="p">
|
<xsl:element name="div">
|
||||||
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
|
|
||||||
<xsl:for-each select="info">
|
<xsl:for-each select="info">
|
||||||
|
<p>
|
||||||
<xsl:element name="time">
|
<xsl:element name="time">
|
||||||
<xsl:attribute name="datetime">
|
<xsl:attribute name="datetime">
|
||||||
<xsl:if test="not(@date)"><xsl:value-of select="date"/></xsl:if>
|
<xsl:if test="not(@date)"><xsl:value-of select="date"/></xsl:if>
|
||||||
|
@ -134,8 +134,9 @@ time { font-family: Arial, sans-serif; font-size: 10pt; }</xsl:text>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:element><br/><xsl:text>
</xsl:text>
|
</xsl:element><br/><xsl:text>
</xsl:text>
|
||||||
|
|
||||||
<xsl:copy-of select="./node()" />
|
<xsl:copy-of select="./node()" />
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
|
</p>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
</xsl:element><xsl:text>
</xsl:text>
|
</xsl:element><xsl:text>
</xsl:text>
|
||||||
|
|
15
rss.xsl
15
rss.xsl
|
@ -103,7 +103,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
<xsl:text> 		</xsl:text>
|
<xsl:text> 		</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:for-each select="link">
|
<xsl:for-each select="link"><!-- files to link, bit maybe not add as enclosure -->
|
||||||
<!--
|
<!--
|
||||||
<xsl:if test="((position() > 1) and ($limitenclosures = 1))">
|
<xsl:if test="((position() > 1) and ($limitenclosures = 1))">
|
||||||
-->
|
-->
|
||||||
|
@ -113,6 +113,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
<xsl:when test="substring(., string-length(.) - 2) = 'zip'">ZIP</xsl:when>
|
<xsl:when test="substring(., string-length(.) - 2) = 'zip'">ZIP</xsl:when>
|
||||||
<xsl:when test="substring(., string-length(.) - 3) = 'html'">HTML</xsl:when>
|
<xsl:when test="substring(., string-length(.) - 3) = 'html'">HTML</xsl:when>
|
||||||
<xsl:when test="substring(., string-length(.) - 3) = 'epub'">ePUB</xsl:when>
|
<xsl:when test="substring(., string-length(.) - 3) = 'epub'">ePUB</xsl:when>
|
||||||
|
<xsl:when test="substring(., string-length(.) - 6) = 'torrent'">Torrent</xsl:when>
|
||||||
<xsl:otherwise>unknown</xsl:otherwise>
|
<xsl:otherwise>unknown</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
@ -161,6 +162,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
<xsl:when test="substring($href, string-length($href) - 2) = 'zip'">zip</xsl:when>
|
<xsl:when test="substring($href, string-length($href) - 2) = 'zip'">zip</xsl:when>
|
||||||
<xsl:when test="substring($href, string-length($href) - 3) = 'html'">html</xsl:when>
|
<xsl:when test="substring($href, string-length($href) - 3) = 'html'">html</xsl:when>
|
||||||
<xsl:when test="substring($href, string-length($href) - 3) = 'epub'">epub</xsl:when>
|
<xsl:when test="substring($href, string-length($href) - 3) = 'epub'">epub</xsl:when>
|
||||||
|
<xsl:when test="substring($href, string-length($href) - 6) = 'torrent'">torrent</xsl:when>
|
||||||
<xsl:otherwise>unknown</xsl:otherwise>
|
<xsl:otherwise>unknown</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
@ -203,6 +205,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
</xsl:element><xsl:text> 	</xsl:text>
|
</xsl:element><xsl:text> 	</xsl:text>
|
||||||
|
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<!--
|
||||||
<xsl:when test="$type = 'zip'">
|
<xsl:when test="$type = 'zip'">
|
||||||
|
|
||||||
<xsl:element name="enclosure">
|
<xsl:element name="enclosure">
|
||||||
|
@ -212,6 +215,16 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
</xsl:element><xsl:text> 	</xsl:text>
|
</xsl:element><xsl:text> 	</xsl:text>
|
||||||
|
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
-->
|
||||||
|
<xsl:when test="$type = 'torrent'">
|
||||||
|
|
||||||
|
<xsl:element name="enclosure">
|
||||||
|
<xsl:attribute name="url"><xsl:value-of select="$href"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="length"><xsl:value-of select="$filesize"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="type">application/octet-stream</xsl:attribute>
|
||||||
|
</xsl:element><xsl:text> 	</xsl:text>
|
||||||
|
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:element name="enclosure">
|
<xsl:element name="enclosure">
|
||||||
<xsl:attribute name="url"><xsl:value-of select="$href"/></xsl:attribute>
|
<xsl:attribute name="url"><xsl:value-of select="$href"/></xsl:attribute>
|
||||||
|
|
Loading…
Reference in New Issue