Skip to main content

Snippets menu magic

Project description

Snippets Menu Magic


Introduction

SnippetsMenuMagic is an IPython extension that let's you easily create menu directly from the notebook.

The menu elements can be snippets of code, internal/external links, markdown documents etc.

Is meant to be used with Snippet Menu that is part of jupyter contrib nbextensions.

Installation

The package can be installed as follows:

pip install snippets_menu_magic

After installation, the extension may be loaded within an IPython session with :

%load_ext snippets_menu_magic

This extension rely on dpath to traverse the dictionary with xpath syntax. (it should be pulled automatically by pip)

It helps to also enable Snippet Menu extension to later see the results

Quick usage how-to

Add a menu and a sub-menu

%%snip_add usage/how-to
this content will be pasted when the menu is clicked
can be multiple lines too

Add a link

%%snip_add bookmarks nbextensions -link
https://github.com/ipython-contrib/jupyter_contrib_nbextensions    

Rename and place it as a top menu

%snip_mv bookmarks/nbextensions top/bookmarks/nbextensions 

Search

s=%snip_search "**/*extensions"

Remove it

%snip_rm usage/how-to

Please take a moment to read the Guide or better run the GUIDE notebook locally and play with it

Development

The latest release of the package may be obtained from GitHub.

Author

This software was written and packaged by Eli Spizzichino

License

This software is licensed under the

Apache 2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snippets_menu_magic-0.2.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

snippets_menu_magic-0.2.2-py2.py3-none-any.whl (31.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file snippets_menu_magic-0.2.2.tar.gz.

File metadata

  • Download URL: snippets_menu_magic-0.2.2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.18.4

File hashes

Hashes for snippets_menu_magic-0.2.2.tar.gz
Algorithm Hash digest
SHA256 23c1a18d407c16ba787c9ddc675a0dd5fc72a465f34c74c541161fc5cab28a07
MD5 74878d85674f5f7c79d837543839f1b9
BLAKE2b-256 8944441bf9a7b3f23d22f5a448c2e25ee38739b1d6c35f16ed2a3f586052f2e4

See more details on using hashes here.

File details

Details for the file snippets_menu_magic-0.2.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for snippets_menu_magic-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 61771f87a99aff32b80bc48ec7e5d7118c20de3505cc1efdea624527ae859447
MD5 b3e2152bec1230a52f48eaf8ed790d39
BLAKE2b-256 6e189d4ad0e0003fac11c4ccc1f17dfc41b105df776ef59bdec7da76bf9cc821

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page