Re: Interested in this project, API documentation request.



On 10 August 2012 14:17, Ted Yin <ted sybil gmail com> wrote:
> Hi, developers,
>
> You've done an excellent job!
> I'm write a project which need file visual comparison as a widget-level
> part.
> So is there any guide or documentation for me to reuse your perfect work?
> I just need a widget for comparison. Can you help me?

I'm sorry, but there really isn't any API documentation, and there's
no single widget you can pull out.

Pretty much everything you need is in filediff.py, linkmap.py and
diffutil.py (and matchers.py, though you could also Python's difflib
instead). In particular, the change drawing happens in
FileDiff.on_textview_expose_event, and the inline highlighting in
FileDiff._update_highlighting. You'll need to have a widget setup like
the one that Meld uses though, with textviews, linkmaps, etc. arranged
appropriately.

If you just want a visual comparison, much of what Meld does is
overkill; much of the code is involved in supporting on-the-fly
updating and other editing features. You might be able to remove
editing functionality from FileDiff piece-by-piece to get down to a
simple comparison component.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]