GithubHelp home page GithubHelp logo

notebook-extensions's Introduction

Notebook-extensions

This repository contains several Javascript extensions for Jupyter:

  • Cell tools: Two column and tabbed modes for input/output of notebook cells
  • Document tools:
    • Sections: Move whole sections up and down, number sections.
    • Create table of contents (TOC) and create references/citations
  • Spell check: spell check for markdown cells
  • Annotate: temporary drawing annotation layer

User notebook sharing:

  • Publish: publish your notebook, by copying it to a certain directory (requires jupyterhub)
  • Submit: copies notebook to instructor (requires jupyerhub)

These extensions were once part of the Calico project.

Install

First download this collection and cd into the folder (here, dollar-sign represents the shell prompt):

$ wget https://github.com/Calysto/notebook-extensions/archive/master.zip
$ unzip master.zip
$ cd notebook-extensions-master
OR:
$ git clone https://github.com/Calysto/notebook-extensions.git
$ cd notebook-extensions

Next, install them into --system, --sys-prefix, or --user:

jupyter nbextension install calysto --user

And finally, enable the extensions you want:

jupyter nbextension enable calysto/document-tools/main
jupyter nbextension enable calysto/cell-tools/main
jupyter nbextension enable calysto/spell-check/main
jupyter nbextension enable calysto/publish/main
jupyter nbextension enable calysto/submit/main
jupyter nbextension enable calysto/annotate/main

To check their status:

jupyter nbextension list

When you now open or reload a notebook, it should load the extensions.

notebook-extensions's People

Contributors

cl3wis avatar deephorizons avatar dsblank avatar koltenpearson avatar marscher avatar rschroll avatar vascotenner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notebook-extensions's Issues

NBExtension installs but will not validate

I ran $ jupyter nbextension install https://github.com/Calysto/notebook-extensions/archive/master.zip and was able to install the extension in /usr/local/share/jupyter/nbextensions.

However, when I attempt to enable the extension, I get:

$ jupyter nbextension enable calico-document-tools
Unrecognized JSON config file version, assuming version 1
Enabling notebook extension calico-document-tools...
      - Validating: problems found:
        - require?  X calico-document-tools

Any idea what this error message means?

spellchecker marks every accented words as wrong (in Spanish)

I have installed the last version of the callico-spell-checker extension by doing sudo jupyter nbextension install https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip

followed by jupyter nbextension enable calico-spell-check

I added an Spanish dictionary by modifying the file /usr/local/share/jupyter/nbextensions/calico-spell-check.js then I create the /usr/local/share/jupyter/nbextensions/typo/dictionaries/es_AR folder and I copy there the files es_AR.aff and es_AR.dir I take those files from my system (Ubuntu 15.04). The .dir file has the words correctly accented.

I am using Jupyter 4.0. Using Ipython 3 and (probably an older version of the spell checker) I had no problem.

Let me know if you need any other information.

Add functionality to right-click and select properly spelled word in spell-check extension

Thank you very much for the notebook-extensions.
I am using Jupyter version 4.2.3, the extension is working perfectly. I am raising this issue for a query related to spell check. The spell check does show the misspelled words as red underline however, I can't able to replace the word with correct spelling. My try to make right click on the word ends in showing the option related to the browser. I am using Firefox browser.

'+' char not allowed in bibtex key

A simple solution was to add the plus char in the range regular expression in the key function in bibtex.js. If this char is not matched things break down, if one tries to parse this key.

Eg.

@article{Kube2007-pcca+,
...
}

nbextension enabled and validated ok, and buttons show up in the notebook but NOT working

Hi

I am most concerned to numbering sections in the notebook and generating table of content (I think this is supposed to be done by document-tool). Here is what I got after typing 'jupyter nbextension list':

(py27) C:\code\ipython_notebook>jupyter nbextension list
Known nbextensions:
config dir: C:\Users\f401569.jupyter\nbconfig
notebook section
calysto/document-tools/main enabled
- Validating: ok
calysto/cell-tools/main enabled
- Validating: ok

I am using jupyter_client 5.0, jupyter_core 4.3, and ipykernel 4.6, ipython 5.3. Could you advise what could be wrong?

Thanks a lot!

linking style (html) incompatible with nbconvert

In #20 @cl3wis introduced a split up of the reference linkage into a Markdown writing and a HTML linking function. I wonder if it would be more desirable to just use Markdown and avoid HTML altogether as it breaks jupyter nbconvert. The links get lost during conversion (to HTML).

Thanks for any feedback on this. I can also provide a PR, if this is wanted.

Publish/Submit should save before copy

When you click on the "Publish" or "Submit" buttons, the notebook should save first. Otherwise, you get the version of notebook on the filesystem, rather than the one in memory.

Reference - link to location in article

Hello,

Thank you for your efforts! This is the first citation nbextension that I have managed to get working!

However just a a glitch I've noticed plus and added suggestion:

  1. When I download the file as a html, the link back to the reference in the webpage no longer works.

For example I found that when the reference box is generated:

<a name="cite-Langmead_Fast_2012"/><sup>[^](#ref-1) </sup>Langmead, Ben and Salzberg, Steven L. 2012. _Fast gapped-read alignment with Bowtie 2_.

should be replaced with:

<a name="cite-Langmead_Fast_2012"/><a href="#ref-1"><sup>[^]</sup></a> Langmead, Ben and Salzberg, Steven L. 2012. Fast gapped-read alignment with Bowtie 2_.

  1. As a suggestion I think it would be really cool if one could pull out a url or doi from the bibtex file and then convert the previous line to:

<a name="cite-Langmead_Fast_2012"/><a href="#ref-1"><sup>[^]</sup></a> <a href="http://dx.doi.org/10.1038/nmeth.1923"> Langmead, Ben and Salzberg, Steven L. 2012. Fast gapped-read alignment with Bowtie 2_. </a>

which would allow one to then click on the article that has been referenced in the notebook.

Thank you again,
Alexis.

install pyforest extension for jupyter notebook

Hello i have installed pyforest with :
pip install --upgrade pyforest
it worked well, but when i run on terminal :
python -m pyforest install_extensions
I have this output :
`Starting to install pyforest extensions for Jupyter Notebook and Jupyter Lab

Trying to install pyforest nbextension...
Traceback (most recent call last):
File "/home/bled/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/bled/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/bled/anaconda3/lib/python3.7/site-packages/pyforest/main.py", line 15, in
install_extensions()
File "/home/bled/anaconda3/lib/python3.7/site-packages/pyforest/utils.py", line 19, in install_extensions
install_nbextension()
File "/home/bled/anaconda3/lib/python3.7/site-packages/pyforest/utils.py", line 38, in install_nbextension
nbextensions.install_nbextension_python("pyforest")
File "/home/bled/anaconda3/lib/python3.7/site-packages/notebook/nbextensions.py", line 225, in install_nbextension_python
destination=dest, logger=logger
File "/home/bled/anaconda3/lib/python3.7/site-packages/notebook/nbextensions.py", line 126, in install_nbextension
ensure_dir_exists(nbext)
File "/home/bled/anaconda3/lib/python3.7/site-packages/jupyter_core/utils/init.py", line 13, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/home/bled/anaconda3/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/home/bled/anaconda3/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter'`

I have tried :
python -m pyforest install_extensions --user
but it doesn't work neither, i have intead the following output :
Usage: python -m pyforest install_extensions installs notebook/lab extensions
Can somone help plz ?

Nothing changes after following installation instructions.

Hi,

Sorry for the very general report. I followed the installation instructions in the readme and there. Everything looks good:

$ jupyter nbextension list
Known nbextensions:
  config dir: /home/ec2-user/.jupyter/nbconfig
    notebook section
      calysto/document-tools/main  enabled 
      - Validating: OK
      calysto/cell-tools/main  enabled 
      - Validating: OK
      calysto/spell-check/main  enabled 
      - Validating: OK
      calysto/publish/main  enabled 
      - Validating: OK
      calysto/submit/main  enabled 
      - Validating: OK
      calysto/annotate/main  enabled 
      - Validating: OK

But, I don't see any buttons and spell check isn't working. Am I missing something?

$ jupyter --version 
4.4.0

Text case mismatch in citation links

For instance, if we have some entry named Surname in the bibtex, the generated inline link for ### [3rd edition](#cite-Surname) in the main body is (indented for clarity)

<h3 id="3rd-edition">
    <a href="#cite-Surname">3rd edition</a><a class="anchor-link" href="#3rd-edition"></a>
</h3>

and the generated html in the References section is (indented for clarity)

<p>
    <a name="cite-surname">
        <sup>[^](#ref-9) </sup>
        Surname, blah blah
    </a>
    <a href="https://website.com/foo/">
        URL
    </a>
</p>

So the href in the main text uses the original case, whereas the name in the references section uses the lowercase.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.