I got involved in DaisyDiff over the last year because I wanted to use
it as a basis for document comparison where multiple people change an
HTML/XML document and then
their changes are merged. (Think the track changes feature of Microsoft Word)
I have searched a lot for an open-source library that would allow me
to diff AND merge HTML files, and didn't find something effective. In
the end I created something on my own.
I am ready to release my code as open-source, but I would like to ask
your opinion first.
My code (which is based on daisydiff) does the following.
1. Takes as input an original HTML (pristine version)
2. Takes as input 1,2,3 or N modified files that are based on pristine version
3. Finds the differences for each file (daisydiff is used here)
4. Performs a merge of the N files into a SINGLE html file that
contains ALL changes present in the N documents.
The last step is of course the critical one (and contains most of my code)
Example 1 (trivial):
See screenshot simple-merge.png
Here two reviewers take the original file. One is adding some words at
the end of the sentence and the other replaces the first word.
The expected result as shown contains both changes in a single sentence
Example 2: (formatting changes)
See screenshot formatting-merge.png
My code can detect formatting changes (e.g. bold, italics, lists,
tables) and not only pure text. In that case it is smart enough that
it creates a superset of all tags affecting a text segment. For
example if one reviewer makes the text bold, and the other one makes
it italic
the result is text that is bold and italic as well.
As you notice in the screenshot the word "original" is both bold and
italics. See also the tooltip.
Example 3 (conflicts)
I have also created an alternative output mode where changes that
happen in the same position are shown as conflicts with a special
background colour. This is similar to conflicts in revision control
systems such as svn or cvs. This mode can be turned or or off with a
single switch.
See screenshot conflict-merge.png
Here I am using 3 reviewers (the code can take N reviewers really)
I am thinking of releasing this code either a separate google code
project or as part of DaisyDiff (if Guy permits it).
I will use the same licence (Apache)
What do you think?
Does anybody have an interest on this library?
If my examples were not clear, please say so and I will elaborate.
I am including as a zip file all the html files used in the examples.
Kostis
--
You received this message because you are subscribed to the Google Groups "DaisyDiff" group.
To post to this group, send email to dais...@googlegroups.com.
To unsubscribe from this group, send email to daisydiff+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/daisydiff?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msgid/daisydiff/CAEu6pgkoWfQgD%3DDHxhZ501Uj%3DoSxUGg_F%3DnL70dXNYDiXzwBDw%40mail.gmail.com.