Tuesday, 14 April 2009

SVN Log to Latex

Needed to add a table of my svn log into my project write up so created a simple style sheet that would parse the xml output from svn. The xslt only generates the table

svnlog-gen.sh

#usage svnlog-gen.sh [repo-path] [output-file]
svn log --xml $1 > tmp.out; xsltproc svnlog.xslt tmp.out > $2; rm tmp.out

svnlog.xslt

Example Output

2 comments:

  1. This is exactly what I needed! Thank you very much!!!

    ReplyDelete
  2. What Markus said.

    You should be able to avoid the temp file with a pipe, viz:

    svn log --xml $1 | xsltproc svnlog.xslt > $2

    ReplyDelete