[GH-ISSUE #1300] Importing Jupyter notebooks #493

Open
opened 2026-03-03 00:21:34 +03:00 by kerem · 11 comments
Owner

Originally created by @J-Savage on GitHub (Nov 6, 2021).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/1300

Is there any way, or any plans, to import Jupyter notebooks into boost note? I've noticed that R Markdown output files import reasonably well as an html file, but not sure about Jupyter.

Originally created by @J-Savage on GitHub (Nov 6, 2021). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/1300 Is there any way, or any plans, to import Jupyter notebooks into boost note? I've noticed that R Markdown output files import _reasonably_ well as an html file, but not sure about Jupyter.
Author
Owner

@Komediruzecki commented on GitHub (Nov 20, 2021):

Hi,

Which type do you mean by Jupyter? If ipynb, you could convert It to markdown yourself: https://ipython.org/ipython-doc/3/notebook/nbconvert.html, or just use JupyterLab to load and download Markdown (or HTML) file from the notebook. Afterward, HTML or MD files could be imported to Boost Note.

Does this solution satisfy you, or you would need an importer who would do something similar?

We don't have any plans currently for this, but it seems like a nice feature, there is maybe some library that converts it, so we could use it to implement this.

<!-- gh-comment-id:974707966 --> @Komediruzecki commented on GitHub (Nov 20, 2021): Hi, Which type do you mean by Jupyter? If `ipynb`, you could convert It to markdown yourself: https://ipython.org/ipython-doc/3/notebook/nbconvert.html, or just use JupyterLab to load and download Markdown (or HTML) file from the notebook. Afterward, HTML or MD files could be imported to Boost Note. Does this solution satisfy you, or you would need an importer who would do something similar? We don't have any plans currently for this, but it seems like a nice feature, there is maybe some library that converts it, so we could use it to implement this.
Author
Owner

@J-Savage commented on GitHub (Dec 18, 2021):

I tried the methods you suggested. Exporting from JupyterLab to HTML and then importing to BoostNote lost a lot of formatting. Doing the same with MD worked much better (as expected). The only major issue is that JupyterLab saves plots as separate png files which don't get imported automatically to BoostNote when importing the MD file. This isn't so much an issue with small notebooks, but when there are several dozen plots it can be a bit of a pain.

<!-- gh-comment-id:997196942 --> @J-Savage commented on GitHub (Dec 18, 2021): I tried the methods you suggested. Exporting from JupyterLab to HTML and then importing to BoostNote lost _a lot_ of formatting. Doing the same with MD worked much better (as expected). The only major issue is that JupyterLab saves plots as separate png files which don't get imported automatically to BoostNote when importing the MD file. This isn't so much an issue with small notebooks, but when there are several dozen plots it can be a bit of a pain.
Author
Owner

@Komediruzecki commented on GitHub (Dec 18, 2021):

Hi,

Since they are separate PNG files, then I suppose you would need to give the Boost Note the whole zip containing PNGs as well as ipynb, this would definitely need a custom importer but is not out of the question.

<!-- gh-comment-id:997283454 --> @Komediruzecki commented on GitHub (Dec 18, 2021): Hi, Since they are separate PNG files, then I suppose you would need to give the Boost Note the whole zip containing PNGs as well as `ipynb`, this would definitely need a custom importer but is not out of the question.
Author
Owner

@webbdays commented on GitHub (Mar 2, 2022):

I would like to work on this issue.

We can use existing file importer(allow to import jupyter notebooks as well).

  1. User uploads jupyter notebooks.
  2. Let's say those files saved in a folder1 on the server.
  3. Now on the server run a python script to convert the jupyter notebooks to Markdown files.
  4. Python script : use subprocess module to run system command.
<!-- gh-comment-id:1056677181 --> @webbdays commented on GitHub (Mar 2, 2022): I would like to work on this issue. We can use existing file importer(allow to import jupyter notebooks as well). 1. User uploads jupyter notebooks. 2. Let's say those files saved in a folder1 on the server. 3. Now on the server run a python script to convert the jupyter notebooks to Markdown files. 4. Python script : use subprocess module to run system command.
Author
Owner

@webbdays commented on GitHub (Mar 2, 2022):

https://ipython.org/ipython-doc/3/notebook/nbconvert.html

Command : ipython nbconvert --to markdown notebook.ipynb

<!-- gh-comment-id:1056687956 --> @webbdays commented on GitHub (Mar 2, 2022): https://ipython.org/ipython-doc/3/notebook/nbconvert.html Command : ipython nbconvert --to markdown notebook.ipynb
Author
Owner

@webbdays commented on GitHub (Mar 8, 2022):

Is it not implementable ?

<!-- gh-comment-id:1061671538 --> @webbdays commented on GitHub (Mar 8, 2022): Is it not implementable ?
Author
Owner

@Komediruzecki commented on GitHub (Mar 8, 2022):

Hi,

sorry for long await,

It should be implementable, but maybe the best would be through dedicated server i.e. PDF exporter server which we use or something similar.

Unfortunatelly you cannot work on it since backend is currently not accessible for community.

Maybe @Rokt33r can give some insights into how achievable and prioritized this should be.

<!-- gh-comment-id:1061896597 --> @Komediruzecki commented on GitHub (Mar 8, 2022): Hi, sorry for long await, It should be implementable, but maybe the best would be through dedicated server i.e. PDF exporter server which we use or something similar. Unfortunatelly you cannot work on it since backend is currently not accessible for community. Maybe @Rokt33r can give some insights into how achievable and prioritized this should be.
Author
Owner

@webbdays commented on GitHub (Mar 8, 2022):

Ok

<!-- gh-comment-id:1062072165 --> @webbdays commented on GitHub (Mar 8, 2022): Ok
Author
Owner

@Rokt33r commented on GitHub (Mar 9, 2022):

@webbdays

I'd like to have a CLI app to tackle this issue rather than implementing directly to our server.

The CLI should:

  1. Be installable via NPM
  2. Generate markdown files and image assets
  3. Upload the assets via Boost Note API and generate a map of URL of the uploaded assets.
  4. Create docs via Boost Note while replacing asset URLs in the markdown files with the URL of the uploaded.

Do you think you can tackle the 1st and 2nd ones? I'll check our API to figure out what I need to implement more for the 3rd and the 4th.

<!-- gh-comment-id:1062598147 --> @Rokt33r commented on GitHub (Mar 9, 2022): @webbdays I'd like to have a CLI app to tackle this issue rather than implementing directly to our server. The CLI should: 1. Be installable via NPM 2. Generate markdown files and image assets 3. Upload the assets via Boost Note API and generate a map of URL of the uploaded assets. 4. Create docs via Boost Note while replacing asset URLs in the markdown files with the URL of the uploaded. Do you think you can tackle the 1st and 2nd ones? I'll check our API to figure out what I need to implement more for the 3rd and the 4th.
Author
Owner

@webbdays commented on GitHub (Mar 12, 2022):

@Rokt33r

I am building a cli in python. Because nbconvert module is available in Python for notebook to Markdown conversion.

I was able to convert to markdown.
But trying to convert raw image data into images.

If it is done I will make a c program file out of it using cython and compile it.
And will use that binary in the module and package it as npm package.

<!-- gh-comment-id:1065904700 --> @webbdays commented on GitHub (Mar 12, 2022): @Rokt33r I am building a cli in python. Because nbconvert module is available in Python for notebook to Markdown conversion. I was able to convert to markdown. But trying to convert raw image data into images. If it is done I will make a c program file out of it using cython and compile it. And will use that binary in the module and package it as npm package.
Author
Owner

@webbdays commented on GitHub (Mar 13, 2022):

even better way to get binary from python program is with pyinstaller python package.

<!-- gh-comment-id:1066025017 --> @webbdays commented on GitHub (Mar 13, 2022): even better way to get binary from python program is with pyinstaller python package.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#493
No description provided.