tags:

views:

97

answers:

4

We have an Winforms application that has access to many versions of a plain text document. We'd like to have a component that takes a list of documents and allows a user to pick two, and then shows the differences in terms of crossed out and other-colored text. Something like 37Signals "Writeboard".

We know we can use a version of diff to make this component for ourselves, but it would take a week or two. Does something - preferably open source - already exist?

A: 

Working in the legal industry, I can tell you that text comparison -- known as redlining -- is a very important capability to have. It gets very sophisticated. In this vertical market, the market leader is from a company called Workshare Technology. Unfortunately, it is far from open source. And the only "API" I know of is from the command line. Although it is probably not a fit, I thought I'd bring it to your attention just in case.

Decker
thanks, this is interesting
Old Man
A: 

My Pretty Diff tool has a mode for plain-text. It highlights the differences visually and even accounts for differences in white space. It is written entirely in JavaScript so it is open-source by nature and reconfigurable and runs directly from your browser without any installation. Give it a try to see if it meets your needs.

http://mailmarkup.org/prettydiff/prettydiff.html

A: 

If you're looking for something that takes its job seriously you can use WinMerge. For a simple tool you could go with CSDiff. Both are windows apps with both graphical and command line interfaces so you can use them as components from other apps. Both are free.

Manos Dilaverakis
+1  A: 

I found a library in C# and many other languages on Google Code that we're going to use. We'll have a UI to allow users to select any two version of a bit of text and see the differences. It shows differences in HTML, but we're going to modify it to make RTF.

Anyway, thanks for the responses.

Old Man