aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
Diffstat (limited to 'utility')
-rw-r--r--utility/datasource.xsl24
-rwxr-xr-xutility/git_log.sh7
-rw-r--r--utility/master.xsl34
-rw-r--r--utility/reference_commit.xsl25
-rw-r--r--utility/xhtml.xsl18
5 files changed, 108 insertions, 0 deletions
diff --git a/utility/datasource.xsl b/utility/datasource.xsl
new file mode 100644
index 0000000..411086a
--- /dev/null
+++ b/utility/datasource.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:output
+ method="xml"
+ omit-xml-declaration="no"
+ encoding="UTF-8"
+ indent="no"
+/>
+
+<xsl:variable name="root" select="/datasource"/>
+
+<xsl:template match="/">
+ <datasource>
+ <xsl:apply-templates />
+ </datasource>
+</xsl:template>
+
+<xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/utility/git_log.sh b/utility/git_log.sh
new file mode 100755
index 0000000..2dfb0bd
--- /dev/null
+++ b/utility/git_log.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+format="<commit hash=\"%h\"><date>%cd</date><message><![CDATA[# %B]]></message></commit>"
+
+ git --no-pager -C $1 log --date=iso --pretty=tformat:"$format" \
+| tidy --input-xml yes --escape-cdata true --wrap 0 \
+| sed -e 's~^\([\*]\)\{3\}~\t\t\*~g' -e 's~^\([\*]\)\{2\}~\t\*~g'
diff --git a/utility/master.xsl b/utility/master.xsl
new file mode 100644
index 0000000..077c9e3
--- /dev/null
+++ b/utility/master.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:output
+ method="xml"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ omit-xml-declaration="yes"
+ encoding="UTF-8"
+ indent="no"
+/>
+
+<xsl:variable name="root" select="/datasource"/>
+
+<xsl:template match="/">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="robots" content="all"/>
+ <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
+</head>
+<body>
+ <xsl:apply-templates />
+</body>
+</html>
+</xsl:template>
+
+<xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/utility/reference_commit.xsl b/utility/reference_commit.xsl
new file mode 100644
index 0000000..63cb064
--- /dev/null
+++ b/utility/reference_commit.xsl
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:template match="@* | node()" mode="commit">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()" mode="commit"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="commit" mode="commit">
+ <xsl:copy>
+ <xsl:attribute name="repository">
+ <xsl:value-of select="../@handle"/>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="@* | node()" mode="commit"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="message | date | text()" mode="commit"/>
+
+</xsl:stylesheet>
diff --git a/utility/xhtml.xsl b/utility/xhtml.xsl
new file mode 100644
index 0000000..7347962
--- /dev/null
+++ b/utility/xhtml.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:template match="*" mode="xhtml">
+ <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates select="node()" mode="xhtml"/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="comment() | processing-instruction()" mode="xhtml">
+ <xsl:copy/>
+</xsl:template>
+
+</xsl:stylesheet>