eri*_*mjl 3 jupyter jupyter-notebook nbconvert
我想知道是否可以将Jupyter笔记本导出到与笔记本本身不同的目录中?我正在使用它来构建笔记本的HTML版本,并且希望它们位于docs/我的GitHub存储库中(这是为了利用GH页)。
NBConvert的--output-dir参数执行此操作:https ://nbconvert.readthedocs.io/en/latest/install.html
您可以从命令行或在Jupyter笔记本中使用它。
命令行:
jupyter nbconvert --output-dir='./docs' --to html my_notebook_to_be_converted.ipynb
Run Code Online (Sandbox Code Playgroud)
在Jupyter Notebook单元中:
!jupyter nbconvert --output-dir='./docs' --to html my_notebook_to_be_converted.ipynb
Run Code Online (Sandbox Code Playgroud)
请注意,您不需要使用“ --to html”将笔记本转换为html,因为默认输出格式为html。我仅为了清楚起见而包含了该论点。
| 归档时间: |
|
| 查看次数: |
1388 次 |
| 最近记录: |