# JupyterLab bundler names

**URL:** <https://discourse.jupyter.org/t/jupyterlab-bundler-names/4051>\
**Category:** JupyterLab\
**Tags:** how-to, nbconvert, question\
**Created:** [April 20, 2020, 6:12am UTC](https://discourse.jupyter.org/t/jupyterlab-bundler-names/4051 "2020-04-20T06:12:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![betatim](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/betatim/32/10_2.png) [@betatim](https://discourse.jupyter.org/u/betatim)\
**Post date:** [April 20, 2020, 6:12am UTC](https://discourse.jupyter.org/t/jupyterlab-bundler-names/4051/1 "2020-04-20T06:12:37Z")

</div>

Does somebody know the different ways a bundler extension can influence the name displayed in the “Export As …” menu of JupyterLab?

 ![Screenshot 2020-04-20 at 07.45.22](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/f/f428b70e121ca37b6086848649d2a5b8d39c6085.png)

I created a new extension that allows users to save their notebook as PDF. I would like to display a name like in this screenshot. However the way it is setup right now I get a 404 when I click that menu item.

I am currently using nbconvert’s “register a exporter via an entry point” way of configuring things:

> <https://github.com/betatim/notebook-as-pdf/blob/afce4e287e2f856863ad51bebdc72080428d2ea0/setup.py#L24-L26>

JupyterLab seems to use the part to the left of the `=` as the name to display in the menu. When I change the entrypoint definition to

```python

    entry_points={
        "nbconvert.exporters": ["PDF = notebook_as_pdf:PDFExporter"]
    },

```

I get two entries called “PDF”. The first one is my new extension, the second one the default exporter. Everything works (how the notebook keeps them apart is a mystery 😉 ) in this setup. The problem is that as a unsuspecting user it is hard to know which “PDF” extension is which.

My thinking right now is that using a white-spaced name in the entry points definition doesn’t quite work. In classic notebook the `export_from_notebook` attribute of the exporter class is used. So I can get a pretty name that way. However lab doesn’t seem to use that. Does anyone know what is used instead? In particular the menu entry for rST exporter or reveal.js exporter have “pretty names” which I would like to copy. Looking at the nbconvert code ([here](https://github.com/jupyter/nbconvert/blob/3bd3c7f9c208b79f03a09f999828dfd139630038/nbconvert/exporters/rst.py) and [here](https://github.com/jupyter/nbconvert/blob/3bd3c7f9c208b79f03a09f999828dfd139630038/setup.py#L260)) I can’t work out how it does this magic trick. Some pointers or ideas would be welcome.

[Try yourself with this binder](https://mybinder.org/v2/gh/betatim/notebook-as-pdf/afce4e287e2f856863ad51bebdc72080428d2ea0)

---

<div class="post-metadata">

**Author:** ![blink1073](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/blink1073/32/791_2.png) [@blink1073](https://discourse.jupyter.org/u/blink1073)\
**Post date:** [May 5, 2020, 10:17am UTC](https://discourse.jupyter.org/t/jupyterlab-bundler-names/4051/2 "2020-05-05T10:17:01Z")

</div>

Hi Tim,

We’re getting the info from the `/api/nbconvert` endpoint. Here’s where we [query the info](https://github.com/jupyterlab/jupyterlab/blob/f0153e0258b32674c9aec106383ddf7b618cebab/packages/notebook-extension/src/index.ts#L460) and build up that menu.

---

<div class="post-metadata">

**Author:** ![danlester](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/danlester/32/906_2.png) [@danlester](https://discourse.jupyter.org/u/danlester)\
**Post date:** [May 5, 2020, 12:49pm UTC](https://discourse.jupyter.org/t/jupyterlab-bundler-names/4051/3 "2020-05-05T12:49:07Z")

</div>

@betatim If it helps, last time I checked my nb2xls NBConvert extension works in JupyterLab’s Export menu. It has quite a small codebase that might be easy to compare to yours!

> **[ideonate/nb2xls](https://github.com/ideonate/nb2xls)**
>
> Convert Jupyter notebook to Excel spreadsheet. Contribute to ideonate/nb2xls development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![jpm-z](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jpm-z/32/6985_2.png) [@jpm-z](https://discourse.jupyter.org/u/jpm-z)\
**Post date:** [May 27, 2022, 12:36pm UTC](https://discourse.jupyter.org/t/jupyterlab-bundler-names/4051/4 "2022-05-27T12:36:10Z")

</div>

I’m afraid I understood the question but not the answer.  
I can see setting `export_from_notebook` has an effect in “classic” notebook view, not in JLab.  
However some built-in exporters in JLab do have pretty names in the “Files\>Save and export as…” menu.

Question: How can a custom exporter do that?  
Thanks in advance.
