Online converter notebook->html

57 views
Skip to first unread message

Angel Marchev, Jr.

unread,
Jan 16, 2018, 5:38:38 PM1/16/18
to Project Jupyter
Hi all,
I am trying to implement in my website an online, on-the-fly converter of notebooks which I figured should be working something like this:
1) I compute and save my notebook (with images, base64) on some (local or virtual) machine;
2) I go to my website (Wordpress), I start a new page
3) In the new page I click a button to upload my saved notebook and it is converted to standard html form and imported in the page (not as iframe)
4) If it is possible (not sure yet) I would like to edit the notebook (in html form) after that for additional corrections.

I found out that converting notebooks to HTML (and other formats) could be done by nbconvert.

So the questions are:
* Do I need to install full Jupiter package for using only nbconvert?
* If yes, then which version - Jupyter or JupiterHub? (My site is multiuser community)
* Is there something that I am missing or something that you would advise me?

I am fairly well familiar with php for wordpress development, but I only started using jupyter notebook recently and probably my questions may seem very basic.

Michael Milligan

unread,
Jan 16, 2018, 11:45:23 PM1/16/18
to jup...@googlegroups.com
Hi,

As far as Jupyter components go, the basic nbconvert install only requires the jupyter_core package. Jupyterhub is unrelated to your use-case. Using pip or conda to install nbconvert will pull in the bits you need automatically.

If you are simply planning to render prepared notebooks to HTML, that's probably all you need. If you want to output formats other than HTML, you will also need to install pandoc and possibly a TeX distribution. If you wanted to use the "--execute" flag to actually generate the output cells, then the problem would be much harder, but fortunately it sounds like that's beyond the scope of what you're trying to do.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/c3316cf9-3042-4c47-9855-522194f9075c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Michael Milligan, Ph.D.         | Supercomputing Institute
Assistant Director for          | University of Minnesota
   Application Development      | mill...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

Lawrence D’Oliveiro

unread,
Jan 18, 2018, 6:56:33 PM1/18/18
to Project Jupyter
On Wednesday, January 17, 2018 at 11:38:38 AM UTC+13, Angel Marchev, Jr. wrote:

...my saved notebook ... is converted to standard html form ...

Isn’t that what happens when viewing it in the browser?

M Pacer

unread,
Jan 18, 2018, 10:27:06 PM1/18/18
to jup...@googlegroups.com
Isn’t that what happens when viewing it in the browser? 

If I understand you correctly, that’s not quite right.
If you check out http://nbviewer.jupyter.org/ that is closer to the output provided by nbconvert’s html export.

When you are interacting with a live notebook it is running a web application through the browser; this cannot be achieved by a static html page with no access to an kernel (which is what jupyter nbconvert your.ipynb --to html provides).


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Angel Marchev, Jr.

unread,
Jan 19, 2018, 10:31:27 AM1/19/18
to jup...@googlegroups.com
but it can not be integrated into simple WP web

Virus-free. www.avg.com

--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/NyFu0kdB9Ik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Carol Willing

unread,
Jan 19, 2018, 11:52:53 AM1/19/18
to jup...@googlegroups.com
 Hi Angel,

Folks have given you good tips so far. If you are simply looking to display a notebook (non-interactive), you may wish to try this nbconvert, GitHub gist, and oEmbed solution mentioned on stack overflow (https://stackoverflow.com/questions/43339162/how-to-convert-jupyter-notebook-to-wordpress-suitable-html).

Alternatively, there are static site generators (nikola and hugo) that support notebook display.

Good luck!

You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages