- Notifications
You must be signed in to change notification settings - Fork5.5k
Get the list of exporters from entrypoints#3879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
`exporter_map` is deprecated, so let's use the list of exporters fetchedfrom the installed entrypoints.There's a supposed attribute `export_from_notebook` that should be setto a friendly string name if the exporter should be exposed in thefront-end. However, the exporters defined in `nbconvert` don't have itset, so I haven't used it to determine inclusion in the list. Instead,I've used the entrypoint name as the friendly name, which looks like itwas the intention from the way they are named.I ran the unit tests and tried starting up the notebook server andaccessing the API endpoint to verify the JSON looked correct.
starcruiseromega commentedAug 25, 2018
The JSON from my test run athttp://localhost:8888/api/nbconvert looks like this: {"asciidoc": {"output_mimetype":"text/asciidoc"},"custom": {"output_mimetype":""},"html": {"output_mimetype":"text/html"},"latex": {"output_mimetype":"text/latex"},"markdown": {"output_mimetype":"text/markdown"},"notebook": {"output_mimetype":"application/json"},"pdf": {"output_mimetype":"text/latex"},"python": {"output_mimetype":"text/x-python"},"rst": {"output_mimetype":"text/restructuredtext"},"script": {"output_mimetype":""},"slides": {"output_mimetype":"text/html"}} |
I was working onjupyter/notebook#3879 and itlooks like the intended way to determine whether the exporter shouldshow up in the list generated by the notebook server was by checking`export_from_notebook`, but it isn't defined for any of the builtinexporters.The docs also say this specifies a friendly name for the exporter. Inthe PR mentioned above, I used the name defined by the entrypoint to keythe exporter. It sounds like maybe we should use the value in`export_from_notebook` instead, so I've made them match, but perhapsit's confusing to have a "name" for the entrypoint in two places.
starcruiseromega commentedAug 25, 2018
starcruiseromega commentedAug 25, 2018
I openedjupyter/nbconvert#864 to add the |
minrk commentedSep 7, 2018
This is great, thank you! |
exporter_mapis deprecated, so let's use the list of exporters fetchedfrom the installed entrypoints.
There's a supposed attribute
export_from_notebookthat should be setto a friendly string name if the exporter should be exposed in the
front-end. However, the exporters defined in
nbconvertdon't have itset, so I haven't used it to determine inclusion in the list. Instead,
I've used the entrypoint name as the friendly name, which looks like it
was the intention from the way they are named.
I ran the unit tests and tried starting up the notebook server and
accessing the API endpoint to verify the JSON looked correct.