跳转到主要内容

Marp的JupyterLab扩展

项目描述

marpyter - Marp for JupyterLab

Github Actions Status

marpyter 是一个JupyterLab扩展,允许您在JupyterLab中直接使用Marp创建交互式幻灯片。此扩展提供了实时预览基于Markdown的幻灯片的便捷方式。

marpyter

如何使用

要使用 marpyter 渲染Markdown文件,从JupyterLab的文件浏览器面板中,用户可以右键单击Markdown文件 -> 打开方式 -> Marp预览。将打开一个新面板,显示Marp幻灯片的渲染内容。

要求

  • JupyterLab >= 4.0.0

安装

您可以使用mamba、pip或conda安装 marpyter

#Using mamba
mamba install marpyter
#Using conda
conda install marpyter
#Using pip
pip install marpyter

卸载

要移除扩展,执行

#Using mamba
mamba uninstall marpyter
#Using conda
conda uninstall marpyter
#Using pip
pip uninstall marpyter

贡献

开发安装

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

jlpm 命令是JupyterLab安装的yarn的固定版本。您可以使用以下命令中的 yarnnpm 替代 jlpm

# Clone the repo to your local environment
# Change directory to the marpyter 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 build

您可以在不同的终端中同时监视源目录并运行JupyterLab,以监视扩展源代码的变化并自动重建扩展。

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

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

默认情况下,jlpm build 命令会为该扩展生成源映射,以便使用浏览器开发者工具进行调试。要同时为 JupyterLab 核心扩展生成源映射,可以运行以下命令:

jupyter lab build --minimize=False

开发模式卸载

pip uninstall marpyter

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

打包扩展

请参阅 RELEASE

项目详情


下载文件

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

源分发

marpyter-0.1.0.tar.gz (1.4 MB 查看散列)

上传时间

构建分发

marpyter-0.1.0-py3-none-any.whl (1.2 MB 查看散列)

上传时间 Python 3

由以下机构支持

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