text comparison proof of concept (WinMerge alternative)

Post your working scripts, libraries and tools
User avatar
Posts: 4760
Joined: 19 Dec 2016, 01:58
Location: UK

text comparison proof of concept (WinMerge alternative)

11 Oct 2017, 12:10

This script is a proof of concept for text comparison (a WinMerge alternative).

What it does is look for the longest line that two strings have in common, and then look above/below for additional adjacent lines, that the strings also have in common. The script does this multiple times.

By doing this the script ends up with regions of lines in each string, alternative matching/non-matching regions. Two htm files are produced accordingly, with text in the non-matching regions highlighted red, and fragment identifiers placed at the start of each red region. The htm files are opened with Internet Explorer and you can then press q or w to jump to the next/previous region.

In future I might try to do something like this with Scintilla controls instead of htm files.

I would welcome other people submitting similar scripts, either that use a similar approach, or a quite different approach, with the final goal of text comparison. I couldn't find anything else like this on the forums so far. Thanks for reading.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Posts: 3093
Joined: 17 Jul 2016, 01:02

Re: text comparison proof of concept (WinMerge alternative)

14 Oct 2017, 18:18

I tried it the other day, it seemed to work. Cool :thumbup:

Code: [Select all] [Download] GeSHi © Codebox Plus

Transform, vHtml, HTML, % vText

I didn't know, fancy stuff.
Thanks for sharing, cheers.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 19 guests