Skip to content

import jupyter notebooks with pictures #2

Description

@bitranox

jupyter notebooks can be first converted to rst via nbconvert, see : https://nbconvert.readthedocs.io/en/latest/usage.html#convert-rst

pandoc is a requirement for nbconvert, see : https://pandoc.org/

.. code-block:: bash

# convert the attached test.ipynb to test.rst
$ jupyter nbconvert --to rst test.ipynb

unfortunately the pictures are not shown and needed to be extracted - a first hint might be : https://gist.github.com/sglyon/5687b8455a0107afc6f4c60b5f313670

or even better : https://github.com/perrette/dimarray/blob/master/docs/scripts/nbconvert_to_rst.py

I would prefer to exctract the pictures after the conversion to RST, and make it a module in rst_include.
Filenames can be a hash of the picture data, in order to avoid web caching issues.

todo :

  • pandoc installation via travis (we need that for nbconvert)
  • nbconvert the notebook to rst
  • extract and store the pictures from there

if You dont need pictures, it aleady works

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions