20

I have two ODT documents, they have very close contents, I want to compare them to see how similar they are.

The best would be to have a similarity percentage, if not possible, an alternative would be at least to have some sort of diff.

I am running Ubuntu Lucid.


Solution:

I used odt2txt to convert the files to text, then used wdiff -i --statistics one.txt two.txt to have a diff along with statistics which gave me the percentage of common words (similarity).

James Mertz
  • 26,529
Weboide
  • 356

4 Answers4

29

Did you try the built-in compare functionality? Edit -> Track Changes -> Compare Document....

If you just want a textual diff, your best bet is probably to convert both documents to plain text, then run a regular diff on them. You will have to figure out how to normalize linebreaks though, otherwise the diff will not be very useful.

sleske
  • 23,525
8

I haven't tried them myself but this pair of tools - odt2txt and oodiff - looks promising.

Torello
  • 103
JRobert
  • 7,134
1

If you don't care about text formatting, you may as well copy the contents to plaintext files and use good old diff.

ps: Are you a teacher looking for possible cheaters ? :p

tamtakos
  • 171
1

The way I do this is to produce .pdf files with libreoffice and then use diffpdf to compare the two pdf files. This shows the differences highlighted in parallel windows