Subversion RDFizers

This is a double set of Python scripts that examine commit log entries and generate RDF descriptions of the actions taken.

The "local" scripts are intended to be used on the same machine as the Subversion repository in question as a post-commit hook action or as a query tool on a working copy.

The "remote" scripts are intended to be used against a remote machine using the 'svn log' feature.

How do I get the source code?

You need a Subversion client. Type svn in your shell and see if you have one already installed. If not, go to the Subversion web site and get one.

Then type

 svn co http://simile.mit.edu/repository/RDFizers/svn2rdf/

the source code will be fetched and downloaded to the ./svn2rdf directory.

Local Tools

What is the current status?

rdflog.py is slightly more advanced than svn2rdf.py. You could probably use 'svn log --xml' with an XSLT stylesheet instead of svn2rdf.py, so I haven't looked at it since moving to the server side generator. I have no plans to maintain svn2rdf.py at this point.

rdflog.py does not depend on any RDF libraries right now. It should, so you could feasibly output serializations besides RDF/XML.

How do I use it?

Place rdflog.py somewhere in your filesystem.

Update your repository's post-commit hook to include the command as seen in the post-commit file co-distributed with rdflog.py. Modify as needed (and you will need to). Directions are in the distibuted post-commit.

You should start seeing RDF appearing in your RDF output directory as each commit rolls in.

Remote Tools

Requirements

You need the following commands available to your path

How do I use it?

Here is an example of use:

> python svnlog.py http://simile.mit.edu/repository/ 0 4000 100

will request the verbose logs in XML starting from revision 0 and ending at revision 4000, 100 revisions per log. This will generate 40 xml files in the current working directory. Then run:

> python svn2rdf.py . /path/to/rdf/results/

will run the svn2rdf.xslt stylesheet on top of the svn XML logs found on '.' and dump the resulting RDF/XML into '/path/to/rdf/results/'.

Credits

This software was created and is maintained by the Simile Project and in particular:

Some of the code was derived from work by the Subversion team's post-commit mailer.py script (full credit and reference appears in rdflog.py).