Graphical Diff for ODF documents using

At work we use Subversion for just about all our software project data: source code, design documents, reports. Design documents are usually in MS Word, Excel and Visio. TortoiseSVN is great at using MS Word's "track changes" feature to do a graphical diff of two versions of a document.

At home, I use Linux and Subversion, and also store my ODF ( documents in Subversion. So I've been interested in getting a graphical diff feature working for these documents too, which can be started from the command line, and ideally integrated with Subversion.

Recently I found a Python script to do this in "OpenOffice / OpenDocument diff" on the Catarsis blog. That in turn was based on the diff script used in TortoiseSVN.

I wanted to make some improvements to the script:

  • in the original post, the straight quotes are converted to curly quotes by the blog software, which must be reversed to get it running in Python
  • filenames weren't being passed as command line parameters
  • it didn't work properly on Gnome in Ubuntu, due to some invalid assumptions about whether the just-opened document has the focus in the window manager when it is opened
  • it required the user to first manually start with the special parameters needed for the scripting to work

So, I've made these improvements. I've got the changes in a Mercurial repository, now hosted on in the repository: cmcqueen1975/oodiff.

I have been running this on Ubuntu Linux 9.04 (Jaunty). I have not had success running it on Windows.

This script integrates nicely into Mercurial workflow using the extdiff extension. I've got it set up so I can just type hg oodiff file.odt to see how an ODF file within my Mercurial working copy has changed.


Download from Mercurial repository:



I downloaded this but I

I downloaded this but I couldn't get it to work, what's the usage? I'm using standard Jaunty with gnome.


Hello. Ah yes—dependencies. Try installing the package python-uno using Synaptic Package Manager (under System-->Administration menu). If it's still giving you grief, let me know the error message you get, and hopefully I can tell you something useful.

Thanks, works great! Very useful tool.

Thanks, works great! Only feedback is that a different colour rather than the line through in the same colour would be a huge help in usability. But a very useful tool, nice work.

Just automating a built-in feature

Hello. I should clarify—this code doesn't implement the feature, the feature already exists in OpenOffice. This code just automates it so a diff can be started from the command line. If you want to do a diff in via the menus, you can do it this way:

  1. In (e.g. Writer) open the first document you want to compare
  2. Select menu Edit-->Compare Document...
  3. In the Open dialog box that comes up, choose the second document you want to compare


Thanks for the tip about open office.
However, does anyone know of a graphical way of comparing power point slides?