Function Repository Resource:

NotebookHistoryData

Source Notebook

Collect history of changes in the currently open notebooks

Contributed by: Wolfram Research

ResourceFunction["NotebookHistoryData"][]

gives an association of cell objects and their change times for the input notebook.

ResourceFunction["NotebookHistoryData"][nb]

gives notebook history data for the notebook object nb.

ResourceFunction["NotebookHistoryData"][nb, prop]

returns the specified property.

Details and Options

Times are given as DateObject expressions converted to the user’s timezone.
Supported properties include "Histogram" and "TimelinePlot" and show plots for all change times in the notebook.

Examples

Basic Examples (4) 

History data for the first few cells in the input notebook:

In[1]:=
data = ResourceFunction["NotebookHistoryData"][];
In[2]:=
Take[data, 4]
Out[2]=

History data in a notebook with a few changes:

In[3]:=
nb = CreateDocument[];
In[4]:=
NotebookWrite[nb, #] & /@ Range[3];
In[5]:=
ResourceFunction["NotebookHistoryData"][nb]
Out[5]=

Create a date histogram for all the changes in this notebook:

In[6]:=
ResourceFunction["NotebookHistoryData"][
 EvaluationNotebook[], "Histogram"]
Out[6]=

Create a timeline plot

In[7]:=
ResourceFunction["NotebookHistoryData"][
 EvaluationNotebook[], "TimelinePlot"]
Out[7]=

Scope (2) 

Use a Notebook expression:

In[8]:=
ResourceFunction["NotebookHistoryData"][
 Notebook[{Cell["A Notebook", "Title", CellChangeTimes -> {AbsoluteTime[]}]}]]
Out[8]=

Use a notebook saved to a file:

In[9]:=
ResourceFunction["NotebookHistoryData"]@
 FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", "document.nb"}]
Out[9]=

Properties and Relations (1) 

The resource function NotebookHistoryDialog gives an interactive overview of notebook history data:

In[10]:=
ResourceFunction["NotebookHistoryDialog"][]

Version History

  • 2.0.0 – 26 December 2019
  • 1.0.0 – 31 May 2019

Related Resources

License Information