Welcome to Notebook Player



Notebook-Player is a tool to convert Jupyter notebooks into dynamic HTML pages using SageCell.

Important Notice

As of March 22nd 2021 SageCell has restricted cell Internet access. Notebooks that require Internet access from within code cells will after conversion only work for whitelisted URLs. Whitelisting includes all GitHub URLs. If you need any particular URL whitelisted, please, request in the SageCell Group.

Usage

Make the required player settings for the web page to be generated and load the Jupyter notebook file.

Create the intended view and save the file.

A stylesheet custom.css and Javascript file custom.js in the same directory as the output html file can be used to improve the output.

Input and Output Cells

Input and output cell make it possible to transfer data from one notebook player document to another. Each notebook must contain at most one input and at most one output cell.

Output Cells

Output cells have a markdown cell, giving some explanations, and a code cell printing the commands to instantiate key variables with their current values. Note that only literal values, no objects or plots, can be saved.

Output markdown cells must have a node of the form <span class="nbdataOut"></span> This node may contain a node <ul></ul> with child nodes <li class="successor"><a>...</a></li> where the <a></a> node links to a notebook with an input cell using these variables.

Input Cells

Input cells have a markdown cell, giving some explanations, and a code cell executing the commands to instantiate key variables with specific values.

Input markdown cells must contain a node <span class="nbdataIn"></span>.

Here you can download a sample notebook with an input and an output cell.

Saved States

Output cells have a Save state button. After the output code cell has been evaluated, this button saves the output to the local storage where it can be accessed by default as mtStatus.

If the page generated by the Notebook Player is called through it's page URL augmented by ?status=SomeStatusCode, then the status of the page will be saved from the output cell as SomeStatusCode and the last state saved previously under SomeStatusCode will be automatically loaded into the input cell of the page if there is one.

Notebook Sites

Notebook Sites collect pages as generated by Notebook Player and transfer data between their input/output cells. There is a Notebook Sites player online available which can be used to display collections of Notebook Player pages.

Known Issues

After saving the resulting html view, the page in the player is no longer functional. In order to generate an alternative view, the page must be reloaded.