JupyterLab工具栏主题切换器
项目描述
jupyterlab-theme-toggle
JupyterLab扩展,用于在顶部区域切换主题。
此扩展最初作为jupyterlab-topbar项目的一部分开发,后来提取到其自己的仓库中,并被带回jupyterlab-topbar项目。
先决条件
- JupyterLab 1.0+
安装
JupyterLab 4.x
从JupyterLab 4.0开始,扩展可以作为Python包分发。使用版本1.0.0
,因为其他版本与JupyterLab 4不兼容
pip install jupyterlab-theme-toggle==1.0.0
JupyterLab 2.x和3.x
此扩展需要JupyterLab的jupyterlab-topbar-extension
扩展来显示视觉切换
jupyter labextension install jupyterlab-topbar-extension jupyterlab-theme-toggle
仅安装快捷键(默认为Cmd/Ctrl+y
)
jupyter labextension install jupyterlab-theme-toggle
开发
JupyterLab 4.x
注意:您需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab附带安装的yarn的固定版本。您可以使用yarn
或npm
代替下面的jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab-logout directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build
您可以在不同的终端中同时监视源目录并运行JupyterLab,以便监视扩展源代码中的更改并自动重新构建扩展。
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab
在运行watch命令时,每次保存的更改都会立即在本地构建,并在您的运行JupyterLab中可用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟,以便扩展重建)。
默认情况下,jlpm run build
命令为该扩展生成源映射,以便使用浏览器开发者工具更容易地进行调试。要为JupyterLab核心扩展也生成源映射,可以运行以下命令
jupyter lab build --minimize=False
JupyterLab 3.x
# create a new conda environment
conda create -n jupyterlab-theme-toggle jupyterlab nodejs
conda activate jupyterlab-theme-toggle
# required to place indicators in the top area
jupyter labextension install jupyterlab-topbar-extension
# install dependencies
jlpm
# local install of the extension
jupyter labextension install .
重建软件包和JupyterLab应用
jlpm run build
jupyter lab build
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
jupyterlab_theme_toggler-1.0.0.tar.gz (961.7 kB 查看哈希值)
构建分发
关闭
jupyterlab_theme_toggler-1.0.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e3219c35f5ca8ed4f2a6e11a834d2b4f6f8bbf14115c7403846932d707be2197 |
|
MD5 | 125d0bd34949b8617c41ea8622c4e5b1 |
|
BLAKE2b-256 | ab14efeef904ae44d0e674901d330a747adc3961da5b6b2aba591488f6182fbf |
关闭
jupyterlab_theme_toggler-1.0.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | cb3720350a1d24bd710fb8f2c44289f043f9da85773dc41479eee820d45f9282 |
|
MD5 | ca0d90cbd8f485d727fcdc63f81e7aec |
|
BLAKE2b-256 | 9d0aa0050a3582338ed51554ef5898c0572ecb59862849233051ca8fcd9c96f2 |