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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18626 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2010-02-08 17:50:22 +00:00
parent 113db6f5f5
commit ea5c158b76
3 changed files with 90 additions and 0 deletions

View File

@ -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>

View File

@ -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>

30
contrib/svnlog2ul/svnlog2ul.sh Executable file
View File

@ -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 -