01496: My dream: compare two pages by highlighting

Summary: My dream: compare two pages by highlighting
Created: 2023-10-08 19:37
Status: Open
Category: Cookbook
Priority: 2

Description: Dreams are allowed, right? I dream of a recipe that allows comparing two wiki pages or sections. So in the same way as Notepad++ (with the "compare" plugin) can compare two text files: I have a window on the left and one on the right, and the differences in the text are highlighted.

I searched the Firefox addons, to no avail. It could have been that there was a tool for comparing two browser windows. - Maybe it can be realized within PmWiki? Then it would have to be within a browser tab, i.e. a table? And the two individual pages or sections would be presented there via “include”?

Who will crack this nut for me? I can't do it myself, I'm not a technician.

To explain why I might need this feature: I am very busy with the texts of a philosopher. He changed them again and again, reassembled passages, etc. Sometimes it's maddening when you have to compare two versions, for example to determine which is the younger one, etc. If I could use exactly this feature of Notepad++ within PmWiki, that would be one huge help.

Perhaps the material from the InlineDiff recipe, or the corresponding core function, already offers the first steps towards this? Martin Cuno?

Would that be a wiki source text comparison? Do you need this temporarily/on the fly like the ?action=diff, or do you want to display the differences in a section of a page, similarly to a pagelist? --Petko

For me personally, it would be most pleasant to compare the unformatted texts. So whether a word is italicized in text A but not in text B is not important.

It would be about comparing two finished texts. I imagine: a "main page" so to speak, where I enter in a form field for the left half (table column?): GroupName.PageName(#from#to), and the same for the right half. I click "OK", and then I have both texts/sections visually neatly side by side, highlighted with the differences.

To me it seems extremely demanding. But the PmWiki community with Petko at the helm has always proven to be unbeatable... Martin Cuno?

How are your pages named, is there a pattern or a way to guess the new page from the old one, or vice versa? For example, there would be a pattern if the 2 pages are Group1.Name and Group2.Name (same name, different groups), or Group1.Name and Group1.Name-Draft (name with suffix). --Petko

Try this prototype Test.Diff2 (experimental, may not work well). --Petko

Sorry, Petko, I lost track of it, but it's still very relevant. The prototype looks VERY GOOD, actually perfect. No, there is no rule (for me) as to how the two pages or sections relate to their names. Can I upload the script to my site yet? Where can I find it? Martin, 21/2/2024