Message Boards Message Boards

1
|
1987 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to compare different versions of a notebook?

Posted 1 year ago

When I am working with notebooks, I tend to make small, incremental changes which I test and save with an incrementing file name. For example, my first effort is Notebook1 which I test and, if working, save as Notebook1 and as Notebook2. I now work on Notebook2 ... you get the picture.

From time to time I need to compare one notebook with an earlier version. I have available two software packages, Code Compare and Beyond Compare, but to use them I really need to be able to convert or export the contents of the notebooks as text. I am only really interested in the code/input sections of the notebooks.

POSTED BY: Paul Newton
3 Replies
Posted 1 year ago

Thank you, Rohit, I will look into those.

POSTED BY: Paul Newton

Notebooks are text files so any program that can compare text files will work on notebooks. The problem is that notebooks contain metadata such as CellChangeTimes that make it difficult to discern code changes from metadata changes.

There are functions in the Wolfram Function Repository that can help with this. SaveReadableNotebook, and ExpressionLineDiff.

POSTED BY: Rohit Namjoshi
Posted 1 year ago

I don't have a concrete suggestion at this point, but it might be helpful to know why you need this.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract