divzeroweb

2f30.org website
git clone git://git.2f30.org/divzeroweb
Log | Files | Refs | README | LICENSE

commit 8b8fd55787b5e68b25556af21e9cdd64a552d1ab
parent f4e4ce99bc1bb8c2baa03b21427fcaa80aeeb708
Author: lostd <lostd@2f30.org>
Date:   Thu, 20 Mar 2014 19:27:56 +0200

We use this as our icecast default page and for the IRC bot

Diffstat:
Aconf/index.xsl | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/conf/index.xsl b/conf/index.xsl @@ -0,0 +1,25 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:output method="text"/> + +<xsl:template match="/icestats"> +<!-- only show the first source --> +<xsl:apply-templates select="source[1]"/> +</xsl:template> + +<xsl:template match="source"> +<!-- dummy text nodes to force zero newlines --> +<xsl:text />[<xsl:value-of select="server_name" />] <xsl:text /> +<xsl:text />[<xsl:value-of select="listeners" />] <xsl:text /> +<xsl:choose> +<xsl:when test="title or artist"> +<xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if> +<xsl:value-of select="title" /> +</xsl:when> +<xsl:otherwise>SIGFPE</xsl:otherwise> +</xsl:choose> +<xsl:text> +http://radio.2f30.org:8000/live.ogg +</xsl:text> +</xsl:template> + +</xsl:stylesheet>