Compare two Scrivener projects for differences?

Would be really really really helpful if I could have Scrivener compare two projects for deltas (differences) in:

  1. Binder structure and folder document counts.
  2. Date of documents (created, opened in editor, last changed)
  3. Folder and Document sizes.
  4. Compare the same document in two projects (revisions, edits, etc.).

Obviously, I am asking because scrivener has messed up my projects, and I am in recovery mode. But this would be a smashing addition to Scrivener.

The idea would be to combine revision and snapshot affordances and extend to the granularity of folders and nested folders, and then to entire projects themselves.

Thanks, Randall

If you have lots of differences and need to meticulously track them down, you can compile each project to produce a TXT file. For example, Project01.txt and Projec02.txt.

Then, use a product like BBEdit to compare the two files. Every difference will be flagged. You’ll then have to make your corrections back in Scrivener.

It’s a bit of work, but it’s thorough.

These two can be extracted from the .scrivx files of the relevant projects. These are XML files, so any programming editor should be able to compare them without difficulty. Once you have that information, you can extract the specific files that have changed. These will mostly be RTF files, so you can compare them in Word, in Scrivener itself, or in a variety of other tools.

Any tools more on the user-friendly side of things? I am not a geek. I write code but its all for show, no low level stuff. Not used to the kernel side of things or command line terminal stuff. Do you know of any finder like tools that do fast compare stuff at the user level?

Thanks,

Randall

So I take it that Scrivener doesn’t itself offer anything like a project compare or a document compare feature?

What if I were to compile (export) with document titles, my separate projects as TXT files (Proj1, Proj2, Proj3…), and import these txt files back into a single Scrivener project as separate documents in one project binder, and then use one of scrivener’s own compare features like snapshot?

Would that work? Would there be a way to easily see the delta’s between the separate projects once they were imported as binder documents into a single new “Compare.scriv” Scrivener project?

I can imagine opening Proj1 document, taking a snapshot of it, then opening Proj2 and select all, copy, and then opening Proj1 document and pasting that text from Proj2, replacing all of the text in the original Proj1 document, taking another snapshot, then browsing the compared differences between the two snapshots in the inspector pane using the “compare” command.

Has anyone tried this with book length text documents? How does Scrivener perform when comparing snapshot-ed documents which are 300 pages long?

Thanks,

Randall

The only direct comparison tool is Snapshots. So you could take a Snapshot of Document A, then copy and paste the text of Document B. But no, there are no project-level compare features.

Thank you. I will try this “compare” snapshots function after exporting (compiling) the projects I need to compare separately as single .rtf or .txt files. Will let all of you know how this turns out, whether or not Scrivener handles this compare functionality on project sized (300 page) documents.

Here are two different approaches I have taken in the past. I’ve never actually had Scrivener damage a project, but I’ve certainly damaged my own projects inadvertently, by thinking I had the latest version of it but not, and editing in it for a few days before noticing that. If what your looking for matches that profile, regardless of the cause, then try one of these:

Project merge

Documented in §5.3.2, under subheading Merging Changes from One Project into Another, the concept is simple. You open what you consider to be the master project and then from that, use File ▸ Import ▸ Scrivener Project..., targeting the recovery project, or older version. The result of this will be largely automatic, or more akin to synchronisation, in that the software will go through item by item and select the newest version of each item from both projects. This process creates snapshots for each binder item changed in this way, so that both versions will be available for comparison, and it adds each changed item to a Collection for your review.

This method will work best for cases where both versions of the project have independent edits made to them, and both versions came from the same project. That criteria means anything created by duplication in the file system, Save As, automatic and manually created backups or any other way of copying the original project and editing it. So it’s no good if the two projects came from completely different ancestors and you’re looking to merge them.

Date Search

From Project Search, use the “Reset Search Options” command at the bottom of the search options menu, and type a single * into the search field -or- for a more selective approach, if you know the time range to work within, type mdate:1m into the search field, where “1m” means editing within the past month, “8d” would be 8 days.

Next, click the hook arrow button in the search results header bar to move the results over into the main editor, switch to Outliner mode, add the “Modification Date” column, and sort it by descending.

Set that up in both projects, and now you have a fairly easy list of things to walk through. What I find works best, since merging items will bump the modification date, is to in the master project select the chunk of items you know may conflict (I scroll until I hit items that have identical modification dates in both projects), and make a new static collection from that. This way you can use it as a “to do list”, removing items from the collection as you address them.

How you compare the text itself is up to you, but snapshot method is generally the most effective.