跳转到主要内容

为JupyterLab中的Drawio图表提供PDF导出功能

项目描述

IPyDrawio Export

docs binder-badge install from pypi install from conda-forge build coverage

为JupyterLab中的drawio图表提供PDF导出。

有关更多信息,请参阅主要项目仓库

安装

注意:使用mamba/conda安装方法确保nodejs可用

mamba install -c conda-forge ipydrawio-export  # recommended, or...
conda install -c conda-forge ipydrawio-export  # or...
pip install ipydrawio-export

服务器扩展

ipydrawio-export作为服务器扩展运行。安装后,它应该会自动配置。如果出现问题,可以手动启用

jupyter server extension list   # If you don't see it here...
jupyter server extension enable --sys-prefix --py ipydrawio_export  # run this...
jupyter server extension list   # ... then check it again

注意:如果您使用jupyter notebook(而不是jupyter lab)启动服务器,上面的命令将是serverextension而不是server extension

命令行使用

导出PDF

也可以从命令行生成PDF。

jupyter drawio-export pdf some_file.dio

如果需要,将安装nodejs应用程序到Jupyter数据路径。

jupyter config --paths  # it uses the one in the environment

将来,希望可以更方便地进行打包。

配置

为了确保在没有导出PDF的情况下安装nodejs应用程序(例如,在构建docker容器时),

jupyter ipydrawio-export provision

配置位置

如果已定义,则将尊重这些环境变量,并在

  • $JUPYTER_DATA_DIR
  • $IPYDRAWIO_DATA_DIR

否则,ipydrawio-export将将其文件部署到{sys.prefix}/share/jupyter/ipydrawio_export

注意事项

  • 需要互联网访问
  • 此位置必须由用户可写
  • 必须有大约400MiB的可用空间,主要用于chromium

可以通过以下方式验证有效位置

jupyter ipydrawio-export provision --workdir

开源

本作品根据Apache-2.0许可证授权。

@jgraph/draw-image-export2的源代码也根据Apache-2.0许可证授权。

Copyright 2023 ipydrawio contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  https://apache.ac.cn/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

项目详情


下载文件

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

源代码分发

ipydrawio-export-1.3.0.tar.gz (88.2 kB 查看哈希)

上传时间 源代码

构建分发

ipydrawio_export-1.3.0-py3-none-any.whl (81.8 kB 查看哈希)

上传时间 Python 3

由以下机构支持

AWSAWS云计算和安全赞助商 DatadogDatadog监控 FastlyFastlyCDN GoogleGoogle下载分析 MicrosoftMicrosoftPSF赞助商 PingdomPingdom监控 SentrySentry错误日志 StatusPageStatusPage状态页面