r18626 - gnucash/trunk/contrib - Add svnlog2ul.sh, and accompanying xslt sheets.

Geert Janssens gjanssens at code.gnucash.org
Mon Feb 8 12:50:22 EST 2010


Author: gjanssens
Date: 2010-02-08 12:50:22 -0500 (Mon, 08 Feb 2010)
New Revision: 18626
Trac: http://svn.gnucash.org/trac/changeset/18626

Added:
   gnucash/trunk/contrib/svnlog2ul/
   gnucash/trunk/contrib/svnlog2ul/getlastcommit.xslt
   gnucash/trunk/contrib/svnlog2ul/log2ul.xslt
   gnucash/trunk/contrib/svnlog2ul/svnlog2ul.sh
Log:
Add svnlog2ul.sh, and accompanying xslt sheets.

svnlog2ul.sh is a script to extract the commit messages from svn
between two releases and converts them into a simple html unordered
list. This is a useful aid to create the news pages on the website.

Added: gnucash/trunk/contrib/svnlog2ul/getlastcommit.xslt
===================================================================
--- gnucash/trunk/contrib/svnlog2ul/getlastcommit.xslt	                        (rev 0)
+++ gnucash/trunk/contrib/svnlog2ul/getlastcommit.xslt	2010-02-08 17:50:22 UTC (rev 18626)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE xsl:stylesheet [
+ <!ENTITY tab "&#9;">
+ <!ENTITY newl "&#10;">
+ <!ENTITY space "&#32;">
+]>
+
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  >
+
+ <xsl:output
+   method="text"
+   encoding="utf-8"
+   media-type="text/plain"
+   omit-xml-declaration="yes"
+   standalone="yes"
+   indent="no" />
+
+  <xsl:template match="/">
+    <xsl:value-of select="info/entry/commit/attribute::revision" />
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

Added: gnucash/trunk/contrib/svnlog2ul/log2ul.xslt
===================================================================
--- gnucash/trunk/contrib/svnlog2ul/log2ul.xslt	                        (rev 0)
+++ gnucash/trunk/contrib/svnlog2ul/log2ul.xslt	2010-02-08 17:50:22 UTC (rev 18626)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE xsl:stylesheet [
+ <!ENTITY tab "&#9;">
+ <!ENTITY newl "&#10;">
+ <!ENTITY space "&#32;">
+]>
+
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  >
+  <xsl:output method="xml"
+              doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+              doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+              indent="yes"/>
+
+  <xsl:template match="/">
+<html>
+<head>
+</head>
+<body>
+  <ul>
+    <xsl:apply-templates/>
+  </ul>
+</body>
+</html>
+  </xsl:template>
+
+  <xsl:template match="logentry">
+<li>
+<xsl:value-of select="msg" />
+</li>
+  </xsl:template>
+</xsl:stylesheet>

Added: gnucash/trunk/contrib/svnlog2ul/svnlog2ul.sh
===================================================================
--- gnucash/trunk/contrib/svnlog2ul/svnlog2ul.sh	                        (rev 0)
+++ gnucash/trunk/contrib/svnlog2ul/svnlog2ul.sh	2010-02-08 17:50:22 UTC (rev 18626)
@@ -0,0 +1,30 @@
+#! /bin/bash
+#
+# svnlog2ul.sh <prevrelease> <newrelease>
+#
+# This script will extract all the svn commit messages
+# from the repository between two releases.
+# The result will be printed on standard out as a
+# html unordered list ("bulleted list").
+#
+# Parameters:
+#
+#    <prevrelease> : the svn tag for the release to start
+#                    the commit message search
+#    <newrelease>  : the svn tag for the release to end
+#                    the commit message search
+#
+# The search will return all commit messages between
+# <prevrelease> and <newrelease>
+#
+# Example:
+# 
+#    svnlog2ul.sh 2.3.7 2.3.8
+
+oldrelease=$1
+newrelease=$2
+
+oldrev=$(svn info --xml http://svn.gnucash.org/repo/gnucash/tags/$oldrelease | xsltproc getlastcommit.xslt -)
+newrev=$(svn info --xml http://svn.gnucash.org/repo/gnucash/tags/$newrelease | xsltproc getlastcommit.xslt -)
+
+svn log -r$newrev:$oldrev --xml http://svn.gnucash.org/repo/gnucash/tags/$newrelease | xsltproc log2ul.xslt -
\ No newline at end of file


Property changes on: gnucash/trunk/contrib/svnlog2ul/svnlog2ul.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:eol-style
   + native



More information about the gnucash-changes mailing list