Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import jupyter notebooks with pictures #2

Open
bitranox opened this issue May 9, 2019 · 0 comments
Open

import jupyter notebooks with pictures #2

bitranox opened this issue May 9, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bitranox
Copy link
Owner

bitranox commented May 9, 2019

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

@bitranox bitranox added the enhancement New feature or request label May 9, 2019
@bitranox bitranox self-assigned this May 9, 2019
@bitranox bitranox added the help wanted Extra attention is needed label May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant