Remove 'download as' options in Jupyter Notebook

In our JupyterHub, we have the following options under File -> Download as...

This is way too many options, most of which aren’t used.

How do I remove options we won’t be using? I can see you can add to these, but not sure how to remove…

module “nbconvert” have some exporter below , you need to delete unused export file if you remove some option.image

I think (some part of) the menu is generated by introspecting what converters nbconvert has. Maybe it is possible to disable some converters (or enable only a subset) via a nbcovnert config setting? That is where I’d start poking around.

I think some of the extra entries you are seeing might be because of a change in the notebook.html template, specifically there are two main groups in the screenshot which are essentially duplicates.

In 5.x notebook.html template there are a handful of static entries followed by a loop over whatever nbconvert says is available. In the 6.x template that is replaced with just the loop. Updating notebook on my system removed the duplicates. It might be possible to remove some of the other entries with more granularity by playing with the nbconvert config file. I’ll take a look.

EDIT: It might not be possible to disable options via jupyter_nbconvert_config.py, but it seems like it might be worth adding (e.g. nbconvert/issues/1065). Oddly you can enable/disable pre- and post-processors that way so maybe it won’t be too hard to add.

1 Like

I took a stab at making it possible to enable/disable Exporters within nbconvert and I’ve opened nbconvert/pull/1273 to get some feedback. The PR can do what is being discussed but they might have better ideas about how to achieve the same thing.

1 Like