Skip to main content

Coloured JupyterLab / RetroLab notebook cells based on cell tags

Project description

jupyterlab-empinken-extension

Coloured JupyterLab / RetroLab notebook cells based on cell tags

Jupyterlite demo: https://innovationoutside.github.io/jupyterlab_empinken_extension/

Binder

This extension optionally enables four notebook toolbar buttons that can toggle persistent tag state on notebook markdown and code cells.

To install the prebuilt extension from a wheel:

pip3 install --upgrade jupyterlab-empinken-extension

To install the wheel from this repo:

pip3 install --upgrade https://raw.githubusercontent.com/innovationOUtside/jupyterlab_empinken_extension/main/dist/jupyterlab_empinken_extension-0.1.1-py3-none-any.whl

You may need to restart the JupyterLab server? [NOT TESTED]

I have no idea how to construct the repo so that you could pip install git+REPO and it wouldn't go through the build process. TBH, I'm surprised I made it this far...

The extension detects appropriate tags and adds corresponding classes to the notebook cell HTML DOM, which allows the backgrounds of the styles to be styled:

image

Extension settings can be accessed from the Settings menu (Advanced Settings) and used to define the parsed tag patterns and the corresponding background colours.

image

The extension also allows the display of each of the toolbar buttons to be individually controlled, as well as whether cells with parsed tags have HTML DOM classes added or not.

Building and Pushing Newly Built Wheels to PyPi

# Build
pip install build jupyter-packaging

# Install the package
pip install .

# Node MUST BE INSTALLED
python -m build
# packages built into ./dist

# Push to PyPi
pip install twine
twine upload MY_PACKAGE.whl

Related Blog Posts

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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