Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open IPython notebooks (*.ipynb) in read-only view (like a HTML file)

Nowadays with more and more IPython notebook files (*.ipynb) around, it is very disturbing every time when I want to peek at some notebook I have to open a server for it, and cannot do it in read-only mode. Due to auto-save I can accidentally change the file when reading it if not in read-only mode.

I hope something like this: ipython notebook mynb.ipynb --read-only would work, but sadly it doesn't (although still it creates a server which I don't really want in read-only view). What I really want is to open an ipynb file like a HTML file for reading; currently it seems a missing view of ipynb file, and now the notebook is more like a black-box or near-binary file alone.

(P.S. I am using Linux/Ubuntu.)

like image 367
chentingpc Avatar asked May 10 '16 17:05

chentingpc


People also ask

How do I open IPython notebook Ipynb?

You can open existing Jupyter Notebook files (. ipynb) in the Jupyter Notebook dashboard by clicking on the name of the file in the dashboard (e.g. filename. ipynb ).

How do I open a .ipynb file?

How to open an IPYNB file. You can open an IPYNB file in Jupyter Notebook (cross-platform), Jupyter Notebook Viewer (Web), Cantor (Linux), or Google Colaboratory (Web). To open an IPYNB file in Jupyter Notebook Viewer, the file must be hosted online (via GitHub or another file hosting service).


2 Answers

Try this ipynb Viewer. This renders ipython notebook as a static web-page. Also ypu can convert ipyhton notebook to other formats using

ipython nbconvert --to FORMAT notebook.ipynb. 

Refer Convert Ipython notebook to other formats. Using this you can convert ipython notebook to HTML.

like image 45
Tanu Avatar answered Sep 23 '22 03:09

Tanu


When you change the notebook files' permissions, jupyter's auto-save doesn't touch them:

chmod a-w *.ipynb

Then jupyter goes into read-only mode:

Screenshot of jupyter read-only mode

like image 56
blahblahetcetc Avatar answered Sep 22 '22 03:09

blahblahetcetc