Integrate Winmerge for snapshot comparison

ra
rastoboy
Posts: 9
Joined: Tue Jun 28, 2016 1:34 am
Platform: Windows

Tue Jun 28, 2016 1:40 am Post

I would give my left eyetooth if you would integrate the opensource Winmerge (or winmerge like capabilities) into Scrivener for Snapshot comparison, a la:

Image


No need to get fancy with version control for me! But I have a tendency to over-edit, and I'd give a lot to be able to compare first and last draft, for example, and click to move things over from an old Snapshot into a new one.

lee

User avatar
scokar
Posts: 24
Joined: Tue Dec 01, 2015 10:41 pm
Platform: Windows
Contact:

Tue Jun 28, 2016 5:23 pm Post

Agreed

ra
rastoboy
Posts: 9
Joined: Tue Jun 28, 2016 1:34 am
Platform: Windows

Tue Jun 28, 2016 8:23 pm Post

Actually a little analysis with dependency walker shows that Scrivener and Winmerge are built on different platforms, but I was just analyzing the Winmerge interface and we don't really need all that stuff, anyway. Just a mode you can toggle when you are in split window view would be fabulous.

I believe Kdiff is probably built on QT, and they might be able to lift some code from that. Though probably easier just to copy the interface and write it themselves (as is my experience as a software guy). Might not be too tough to implement. The neatness of Scrivener gives me some confidence that the underlying code is also neat and easy to make changes to :-D

ra
rastoboy
Posts: 9
Joined: Tue Jun 28, 2016 1:34 am
Platform: Windows

Tue Jun 28, 2016 8:24 pm Post

Another option might be to write a Scrivener plugin for Winmerge...but it would be SOOOO much nicer to have within the application.

User avatar
nontroppo
Posts: 1161
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Wed Jun 29, 2016 8:42 am Post

Rather than just focus on WinMerge, a more generic interface would allow *any* Diff utility on *any* platform. Really all Scrivener needs to do is run a [command] with both exported RTF files in the command line. Most diff tools offer a command line interface (so they can work with Git and others).

One major issue of course is that Scrivener uses RTF, and any diff tool that does support RTF (several do at least on MacOS, not sure about WinMerge) will not support RTF formatting, it will just convert RTF to plain text then compare. Now Scrivener can easily export plain text (it does so for MMD support), so that would be another way of generating files for comparison.

There are several other tweaks that would make Snapshots even more powerful in addition to external diff tool support. For example, generating Diff reports for the whole Draft folder (i.e. Scrivenings mode --> a Diff tool), especially powerful if we could do it for named snapshots...

ra
rastoboy
Posts: 9
Joined: Tue Jun 28, 2016 1:34 am
Platform: Windows

Wed Jun 29, 2016 1:41 pm Post

Yeah, that's why I think it's really got to be done from within Scrivener.

I would cheerfully take an integration like that over nothing, but of course you want to save the changed data in Scrivener, so....

Also, kinda clunky.