ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.23k stars 807 forks source link

Installing Extensions #79

Closed RinaldoB closed 10 years ago

RinaldoB commented 10 years ago

Are the extension installing instructions up to date?

The instructions for the Miscellaneous IPython extensions use a different syntax:

copy the extension to the $(ipython locate)/nbextensions/ directory and load it by adding IPython.load_extensions('extension_name'); in custom.js

Could this also be applied top the extensions here?

damianavila commented 10 years ago

Are the extension installing instructions up to date?

Probably not... you could probably install it in the old way or use the new IPython API to install the nbextension... we need to update it, labelling as enhancement...

Could this also be applied top the extensions here?

Yes, I don't see problems... although, maybe, some of them would need some configuration to be loaded in the custom.js too...

juhasch commented 10 years ago

Good topic. I think we should move to $(ipython locate)/nbextensions/ and use the new api, eventually. But this alone does not make it much easier to install and use an extension. You still have to dig into different documentation snippets (sometimes slightly outdated like ours right now) and often also modify the extension .js file to correct the path of a css file. And you need to look at the Javascript output to find out what is going wrong.

In addition to better documentation, I would like to have a script or notebook that installs all or a selected extension and activates/deactivates it in the right custom.js file. I have a notebook that is not quite ready. It searches for custom.js, creates a list of extensions and can also download latest master version from IPython-contrib.

Also, as most extensions seem to load css files now, should we use require as minrk is using in load_css() here: https://github.com/minrk/ipython_extensions/blob/master/nbextensions/toc.js ?

damianavila commented 10 years ago

I like the idea of a notebook that select and install the extensions...

About he css... I am using something like that here: https://github.com/ipython-contrib/IPython-notebook-extensions/blob/master/styling/zenmode/main.js#L59 Not exactly the same, but it follows the same idea... I think it can be done in multiple ways...

juhasch commented 10 years ago

Here is the notebook: https://gist.github.com/juhasch/d8f73f5fd32a66ce7444 Works best with codecells hidden :-) It tries to find the active custom.js file, loads and displays all IPython.load_extensions('') entries. Using widgets you can activate/deactivate these entries. Right now, new extensions need to be added manually. It can also install current IPython-notebook-extensions-master from Github in the local nbextensions directory.

juhasch commented 10 years ago

I have updated the installation instructions in the Wiki to reflect the current state-of-the-art.

damianavila commented 10 years ago

Thanks @juhasch, I think we can close it until we need a new update :wink: