Guillaume
Guillaume

Reputation: 5557

A customizable diff tool that can produce report (in XML, HTML)

I want to provide a diff report for a non regression test. My program is Java based but I did not found any API filling my needs.

So I'm using an external tool (CSDiff) that take 2 files as arguments and return an HTML report. That's nice and easy to setup.

Now the only problem I have is that the HTML report needs some tweaks to be used and I am messing around with the report, trying to transform it into something different (hidding some parts, changing the style, ...)

Does someone know a diff tools that has a powerful command line support, allowing custom report to be generated ? Nice report options would be 2 panes view, regexp filtering, easy styling options... something like the vim diff view in html would be great.

I've already read stuff about diff tools in stackoverflow but I don't find the stuff I'm looking for.

Many Thanks

Upvotes: 8

Views: 10504

Answers (3)

user258608
user258608

Reputation:

I would recommend google-diff-match-patch. This provides HTML or the basic diff components which you could style and transform yourself.

Upvotes: 5

austincheney
austincheney

Reputation: 817

Pretty Diff provides an HTML report either on screen in a web browser or as HTML formatted text that can be saved as an HTML file.

Upvotes: 1

maximdim
maximdim

Reputation: 8169

I don't know such library from top of my head but if Google search doesn't bring anything relevant back, I would take a look at Eclipse sources. Eclipse has very good text diff tool which you might be able to reuse, unless it's tied up pretty badly to their UI stuff, which I hope is not the case.

Upvotes: 0

Related Questions