Save a notebook to a file that is formatted to maximize readability when viewing changes in version control systems
Contributed by:
Richard Hennigan (Wolfram Research)
Examples
Basic Examples (3)
Save a NotebookObject to a human-readable file:
Save a Notebook expression:
Save a copy of a notebook file that already exists:
Options (6)
ExcludedCellOptions (3)
By default, some cell options are automatically stripped:
Preserve all cell options:
Ignore specific options:
ExcludedNotebookOptions (3)
By default, some notebook options are automatically stripped:
Preserve all notebook options:
Ignore specific options:
Applications (5)
SaveReadableNotebook can be used to create notebook files that are well suited for version control systems that look at changes to files on a line-by-line basis.
Here’s a test notebook:
Now make changes to the notebook, then save to a new file:
It can be difficult to visualize what actually changed:
Create a formatted version of each notebook and view changes for those files instead:
The formatted notebook files still open normally:
Related Links
Requirements
Wolfram Language 11.3
(March 2018) or above
Version History
-
1.1.1
– 17 June 2022
-
1.1.0
– 06 May 2022
-
1.0.0
– 03 December 2018
Related Resources