Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A way to quick preview .ipynb files

Got a small basic question. I use a Mac, and I used to work in .py files with Sublime 3. One of the things I liked was that when Sublime is closed, for a given file in a folder--if I'm looking for a bit of code--I could hit the spacebar and Macs open a quick preview of the .py document.

Now I'm working in Jupyter Notebook and saving everything as .ipynb files. Now I can't hit the spacebar and glance at files--I launch JN from the command land and it's far slower.

I suspect there are quicker ways to open .ipynb files in browser windows, but what I really want to know is is there a way to quickly preview those file contents from my desktop? Alternatively, is there a way to work in Jupiter Notebook but save the files as .py (and later seamlessly reopen in JN), such that I could still use the great old spacebar trick?

Thanks for you patience with a pretty small question :)

like image 695
Kees Avatar asked May 23 '18 17:05

Kees


1 Answers

It's been a while since the last answer, but just in case anyone else is looking to use Mac Quicklook to preview Jupyter Notebooks .ipynb files, this app does the job:

Jupyter Notebook Viewer - https://github.com/tuxu/nbviewer-app

You can either download the app from that page or install using brew cask

brew cask install jupyter-notebook-viewer

If the preview is not working you should reload quicklook.
Just open a terminal windows and run. It worked for me on macOS High Sierra.

qlmanage -r

Now enjoy quicklook preview for Jupyter Notebook files :)

like image 192
daco Avatar answered Oct 24 '22 11:10

daco