Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example how to save the notebook (frontend?) and get path and main metadata of the notebook (from the server side?) #203

Open
paugier opened this issue Jul 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@paugier
Copy link

paugier commented Jul 17, 2022

I'd like to have an extension that adds a button (like this) to trigger a command written by the user in the metadata of the notebook.

I guess the command needs to be run on the server side because it uses the .ipynb file. The command needs to be run from the directory containing the ipynb file.

I guess the first step would be to save the notebook to be sure that the file is up to date. I didn't find that in the examples nor in other parts of the documentation (for example here https://jupyterlab.readthedocs.io/en/stable/api/modules/notebook.notebookactions.html).

How can I do that?

Then, I think I need to obtain from the server extension 2 pieces of information:

  • The path of the directory where the notebook is saved
  • A dictionary containing the metadata of the notebook

Is it doable? I wasn't able to find this in the examples.

Additional context

See https://discourse.jupyter.org/t/jupyterlab-extension-to-add-a-button-to-save-the-notebook-and-launch-a-command/14844/3 and #202 (comment)

@paugier paugier added the enhancement New feature or request label Jul 17, 2022
@welcome
Copy link

welcome bot commented Jul 17, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant