jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.73k stars 564 forks source link

Is it possible to compile nbconvert to WebAssembly? #1766

Open pplonski opened 2 years ago

pplonski commented 2 years ago

It is possible to compile nbconvert to WebAssembly? Ive seen JupyterLite and Pyodide are using WASM. Is it possible to run nbconvert in the web browser?

MSeal commented 2 years ago

Parts of nbvonvert should work as is -- I'd need to give it a try on PyScript or something similar to confirm. But some of the conversions rely on latex or other system packages that wouldn't be available in a browser system. For the chromium pdf converstion we'd want to change it to use the active browser DOM instead of launching a process.

dgcmain commented 2 years ago

What about without the Latex and pdf, only HTML generator? I found that tornado is needed as a dependancy and it cant be installed with Pyodide. Any thoughts on a solution?

bollwyvl commented 2 years ago

It is now somewhat possible to run nbconvert in this forthcoming jupyterlite PR: https://github.com/jupyterlite/jupyterlite/pull/756#issuecomment-1214554290

It would take a lot of polish to be actually useful.