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

How do you add custom metadata as you would to display? #33

Open
mpacer opened this issue Mar 20, 2019 · 1 comment
Open

How do you add custom metadata as you would to display? #33

mpacer opened this issue Mar 20, 2019 · 1 comment

Comments

@mpacer
Copy link
Member

mpacer commented Mar 20, 2019

When I went to use scrapbook as a replacement for a display call I discovered that you can no longer use custom metadata.

For example, I used to do something like

    display(IPython.display.SVG(flag._repr_mimebundle_()['text/html']), metadata={"filename": flag_def['name']})

To dump the content of a VDOM object to be able to then extract as an SVG automatically with name "flag_def['name'] by using nbconvert.

This is a particular use case that happens to reflect some of the aspects of how scrapbook could be used (since I can use this with papermill to change out the meaning of flag and flag_def parametrically).

However, it more generally points to the need for an escape hatch to attach additional metadata to the displayed object that should be associated with the displayed object in a persistent fashion.

If we think it would be helpful to add a metadata keyword arg to the glue function (that would just get passed through), I would be happy to make the contribution.

@MSeal
Copy link
Member

MSeal commented Mar 20, 2019

Sounds reasonable to me. Please do feel free to PR the feature.

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

No branches or pull requests

2 participants