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

Convert notebooks directly to pandoc AST #79

Open
chrisjsewell opened this issue Apr 19, 2019 · 0 comments
Open

Convert notebooks directly to pandoc AST #79

chrisjsewell opened this issue Apr 19, 2019 · 0 comments

Comments

@chrisjsewell
Copy link
Owner

chrisjsewell commented Apr 19, 2019

Rather than using nbconvert (and hence jinja) to convert notebooks, it may be conceptually nicer to convert the notebook into the pandoc AST format, then iteratively apply (panflute) filters to the AST, before output.

Note pandoc (since v2.7) does already have notebook conversion. However, this doesn't handle code outputs very well, and also does not preserve cell and output level metadata.

The conversion should be quite simple as it is effectively a json -> json conversion, we would just need to handle:

  1. Specifying an initial preference order for output mimetypes
  2. Extracting images etc (from outputs and attachments) to a folder-like object (either on-disk or virtual)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant