为JupyterLab中的Drawio图表提供PDF导出功能
项目描述
IPyDrawio Export
为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 查看哈希)
关闭
ipydrawio-export-1.3.0.tar.gz的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a89abc2105e432888c41494b14f0543c4a50be50079488ea10bb624935deb453 |
|
MD5 | 8ed6ef7c57ce10cd0ed1100d72ceb56b |
|
BLAKE2b-256 | c635e341b46d5949c22b63ce83a7a7d33c42d5772ab885f09b12e0aa5faffa9d |
关闭
ipydrawio_export-1.3.0-py3-none-any.whl的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3a6ac5da36619b478bd3a0bb1a5908668ac10888bda8360761fb4e4b017c6c94 |
|
MD5 | 321a787ef715b92a84c051d0fca9b8e0 |
|
BLAKE2b-256 | 3729f95e533c126a011bac8464ab9d1e09f8ee0968e0bce6acf952d3e7450b73 |