Marp的JupyterLab扩展
项目描述
marpyter - Marp for JupyterLab
marpyter
是一个JupyterLab扩展,允许您在JupyterLab中直接使用Marp创建交互式幻灯片。此扩展提供了实时预览基于Markdown的幻灯片的便捷方式。
如何使用
要使用 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的固定版本。您可以使用以下命令中的 yarn
或 npm
替代 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 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | b3b631988bbbd35b2c44e1b00c227f3bbe9ca242a09601147958f0f46b46defa |
|
MD5 | 8a524238284d16727604b778e0d2eefa |
|
BLAKE2b-256 | e67eb5d2fa5a71bf569e4b9a5e9e394d458aeca63c555aec832f510a0a90dd40 |
marpyter-0.1.0-py3-none-any.whl 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 22e42d3d8f1da98ffd4362648c4efbe612d3301c6fd0b6e3dc11e6663071601b |
|
MD5 | 21088098c8176baaf54848051b431126 |
|
BLAKE2b-256 | 67f05c2265eb3fa59f2cddbe8dc42dfb2359f770e7200a4b37f4733904de415b |