Add new comment

Graphical Diff for ODF documents using OpenOffice.org

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 (OpenOffice.org) 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 OpenOffice.org 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 OpenOffice.org 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 bitbucket.org 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:

 

http://bitbucket.org/cmcqueen1975/oodiff/

Articles: 

Editor Filtered with Scriptures

  • Web page addresses and e-mail addresses turn into links automatically.
  • Scripture references will be linked automatically to an online Bible. E.g. John 3:16, Eph 2:8-9 (ESV).
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.