Code Snippets Extension for JupyterLab (multi-menus)
Project description
jupyterlab-snippets-multimenu
Snippets extension with multiple menu support for JupyterLab.
This extension is composed of a Python package named jupyterlab-snippets-multimenus
for the server extension and a NPM package named jupyterlab-snippets-multimenus
for the frontend extension.
This repo is forked from the jupyterlab-snippets project.
Requirements
- JupyterLab >= 2.0
- Node.js
Install
pip install jupyterlab-snippets-multimenus
Rebuild JupyterLab:
jupyter lab build
Usage
Add snippets in [jupyter_data_dir]/multimenus_snippets
To find the Jupyter data directory, run:
$ jupyter --path
Any path under data: will do. We recommend using the virtual environment shared directory (e.g. $VENVDIR/share/jupyter/
) (please create the directory if not existed)
Snippets will be organized in menus following the structure of the directories. The directories directly under multimenus_snippets/
will be used to create menus.
The order of menus and sub-menus can be specified using a JSON file. An example is given in example_snippets/multimenus_snippets_config/snippet_config.json
. This file should be put under [jupyter_data_dir]/multimenus_snippets_config/
to take effect. If this config file is not provided, the menu will be created with all files in the directory with a default ordering.
Quick start with examples
Example snippets directories are provided in example_snippets/
.
To test with automatically generated order configuration, do
cp -r example_snippets/multimenus_snippets $VENVDIR/share/jupyter/
and start/refresh jupyter-lab
To test configurable ordering, do
cp -r example_snippets/multimenus_snippets_config $VENVDIR/share/jupyter/
and start/refresh jupyter-lab
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jupyterlab-snippets-multimenus-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66b1c042641cee6376f79191a44225b7be423550ee924f19544c62b5f72e013a |
|
MD5 | dd051594cd7c4991cb1a70dbccca964b |
|
BLAKE2b-256 | 3664782ea26fc18f3259d77c98c74d0f7eefd0631fceb2fb38548c475b210939 |
Hashes for jupyterlab_snippets_multimenus-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92b8cd72152fa8c1b37c6084263d3b9ca4b9876a8ad5455bed14b2bab5705d53 |
|
MD5 | 8314160add28c40227055c6288b5704e |
|
BLAKE2b-256 | fad2393454232046c34755e30f9b03e93409c1a2a98759eba243954984cf0189 |