Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Standalone export ? #292

Open
arnaudmiribel opened this issue Mar 14, 2017 · 13 comments
Open

Standalone export ? #292

arnaudmiribel opened this issue Mar 14, 2017 · 13 comments

Comments

@arnaudmiribel
Copy link

Hi all,

Very happy to use jupyter-dashboard for a project, I'd like to host the dashboard layout as a standalone html page. Is there a way to do that ? That is, export the notebook into .html but activate the same things as when we press the "dashboard preview" button on the UI. Apparently, appending a ?dashboard after the url doesn't work.

I've seen efforts on jupyter-dashboard servers but the installation went wrong for me, it's not that easy, and I just need one single easy page.
Hope I make myself clear :) not sure it's possible.

Thanks for your help

@parente
Copy link
Member

parente commented Mar 22, 2017

Hi @arnaudmiribel. There is no standalone export today. It's possible that nbconvert could be made aware of the dashboard layout information and produce a static HTML document respecting the layout. Is that what you're after?

@arnaudmiribel
Copy link
Author

Hi @parente, that's exactly the point :)

@f0lie
Copy link

f0lie commented Jul 14, 2017

Is there an guide to using nbconvert to do this? I am trying to achieve the same thing.

I am guessing when this project reaches release and traction, dashboard would be added to the formats.

@nikusha37
Copy link

I have the same issue. It would be great to export dashboard layout to static html, even without comprehensive interactions which are triggered by python functions.
I just need static html just different layout because I don't know html.

@Paul-Yuchao-Dong
Copy link

I think a function from NBconvert to be aware of the layout will be really helpful. The user sometimes would need to send html around, not ipynb files that requires the recipient to also download jupyter and install the same extension.

I hope I can help to make this happen, is there any starter guide to nbconvert workings?

@parente
Copy link
Member

parente commented Sep 9, 2017

Thanks for the interest. http://nbconvert.readthedocs.io/en/latest/customizing.html is probably the right place to start. It's possible that all that's need is a bit of custom CSS added to the HTML output already supported by nbconvert that respects the layout metadata documented here: http://jupyter-dashboards-layout.readthedocs.io/en/latest/metadata.html.

@alfonsomhc
Copy link

+1
It would be nice to have an easy way of exporting the dashboard to html

@vinnyricciardi
Copy link

vinnyricciardi commented Dec 14, 2017

+1 more
This would be a great feature

@federicofontana
Copy link

+1
Something along the lines of
jupyter nbconvert --execute main.ipynb --to html --layout dashboard-report
would be amazing.

@5u2ie
Copy link

5u2ie commented Jan 17, 2018

Did anyone find a way to export the grid view in any way?
would also be okay deploying my notebook to some cloud server..
looking for any solution that let's me easily share the grid view with anyone.

@kurt-rhee
Copy link

I would also love this feature

@vhakopian
Copy link

It is already possible to do that with nbconvert thanks to custom templates as @parente suggested. Here is a very simple template that enables to export in html and hides inputs and hidden cells of dashboard view:

{% extends 'full.tpl'%}
{% block any_cell %}
{% if cell['metadata'].get('extensions', {}).get('jupyter_dashboards', {}).get('views', {}).get('report_default', {}).get('hidden', false) %}

{% else %}
{{ super()}}

{% endif %}
{% endblock any_cell %}

{% block input_group %}
{% endblock input_group %}`

Then you just have to run this command:

jupyter nbconvert 'notebook.ipynb' --template=mytemplate.tpl

@bdklahn
Copy link

bdklahn commented Apr 19, 2022

Yes, it is "already possible" to recreate what Jupyter Lab already does when you click the "Open with Voila Gridstack in New Browser Tab", from the Gridstack editor tab/pane, by creating your own template file and using nbconvert.

And here's how I got Voila and Gridstack-type config in a function.

    c = Config()
    c.TemplateExporter.exclude_input = True
    c.TemplateExporter.exclude_output_prompt = True
    c.TemplateExporter.exclude_input_prompt = True
    c.HTMLExporter.template_name = 'gridstack'

But why not just add that to the Export options, like with Reveal JS Slides? Maybe, it would more-appropriately be called a "DeJavu Gridstack" export.

Maybe now, in 2022, it is already being addressed (associated with another Issue?).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests