跳转到主要内容

一个允许使用桌面应用程序打开文件和目录的JupyterLab扩展。

项目描述

jupyterlab-fileopen

Github Actions Status

一个允许使用外部桌面应用程序打开文件和目录的JupyterLab扩展。

在特定于操作系统的文件资源管理器中显示

Open file explorer

使用专用桌面应用程序打开文件

Open file with desktop app

此扩展由名为 jupyterlab-fileopen 的Python包(用于服务器扩展)和名为 jupyterlab-fileopen 的NPM包(用于前端扩展)组成。

需求

  • JupyterLab >= 3.0

安装

要安装扩展,执行

pip install jupyterlab-fileopen

conda install jupyterlab-fileopen -c conda-forge

卸载

要删除扩展,执行

pip uninstall jupyterlab-fileopen

conda remove jupyterlab-fileopen -c conda-forge

故障排除

如果您看到前端扩展,但它不起作用,请检查服务器扩展是否启用

jupyter server extension list

如果服务器扩展已安装并启用,但您看不到前端扩展,请检查前端扩展是否已安装

jupyter labextension list

贡献

开发安装

注意:您需要NodeJS来构建扩展包。

《jlpm》命令是JupyterLab附带并安装的yarn的固定版本。您可以使用 yarnnpm 替代 jlpm

# Clone the repo to your local environment
# Change directory to the jupyterlab-fileopen directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable jupyterlab-fileopen
# 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

在运行监视命令时,每次保存的更改都会立即在本地上构建,并在您运行的 JupyterLab 中可用。刷新 JupyterLab 以在浏览器中加载更改(您可能需要等待几秒钟以等待扩展重新构建)。

默认情况下,jlpm run build 命令为此扩展生成源映射,以便更容易使用浏览器开发者工具进行调试。要为 JupyterLab 核心扩展也生成源映射,可以运行以下命令

jupyter lab build --minimize=False

开发卸载

# Server extension must be manually disabled in develop mode
jupyter server extension disable jupyterlab-fileopen
pip uninstall jupyterlab-fileopen

在开发模式下,您还需要删除由 jupyter labextension develop 命令创建的符号链接。要找到其位置,可以运行 jupyter labextension list 以确定 labextensions 文件夹的位置。然后您可以在该文件夹中删除名为 jupyterlab-fileopen 的符号链接。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源分布

jupyterlab-fileopen-0.2.2.tar.gz (89.7 kB 查看哈希)

上传时间

构建分布

jupyterlab_fileopen-0.2.2-py3-none-any.whl (17.3 kB 查看哈希)

上传时间 Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面