{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/396","repository_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery","labels_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/396/comments","events_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/396/events","html_url":"https://github.com/sphinx-gallery/sphinx-gallery/issues/396","id":334631443,"node_id":"MDU6SXNzdWUzMzQ2MzE0NDM=","number":396,"title":"Capture HTML output as in Jupyter","user":{"login":"GaelVaroquaux","id":208217,"node_id":"MDQ6VXNlcjIwODIxNw==","avatar_url":"https://avatars3.githubusercontent.com/u/208217?v=4","gravatar_id":"","url":"https://api.github.com/users/GaelVaroquaux","html_url":"https://github.com/GaelVaroquaux","followers_url":"https://api.github.com/users/GaelVaroquaux/followers","following_url":"https://api.github.com/users/GaelVaroquaux/following{/other_user}","gists_url":"https://api.github.com/users/GaelVaroquaux/gists{/gist_id}","starred_url":"https://api.github.com/users/GaelVaroquaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaelVaroquaux/subscriptions","organizations_url":"https://api.github.com/users/GaelVaroquaux/orgs","repos_url":"https://api.github.com/users/GaelVaroquaux/repos","events_url":"https://api.github.com/users/GaelVaroquaux/events{/privacy}","received_events_url":"https://api.github.com/users/GaelVaroquaux/received_events","type":"User","site_admin":false},"labels":[{"id":142332533,"node_id":"MDU6TGFiZWwxNDIzMzI1MzM=","url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-06-21T19:44:56Z","updated_at":"2018-08-10T15:37:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"More and more objects can do nice html rendering in the jupyter notebook. For instance pandas dataframe, but also plotting libraries use this.\r\n\r\nThe way it works is that the jupyter kernel calls the \"_repr_html_\" on an object, if present, to get the HTML to display:\r\nhttps://ipython.readthedocs.io/en/stable/config/integrating.html#rich-display\r\n\r\nI think that sphinx-gallery could and should do that. It would make examples better looking. Also, it would enable other plotting libraries to work well with sphinx-gallery.\r\n\r\nThis should be fairly easy. The only technical difficulty that I am seeing is to capture the last object. I confess that I don't know how to do this. But given that ipython and jupyter have been doing it since a long time, it should be feasible."},"comment":{"url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/comments/412120709","html_url":"https://github.com/sphinx-gallery/sphinx-gallery/issues/396#issuecomment-412120709","issue_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/396","id":412120709,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjEyMDcwOQ==","user":{"login":"SylvainCorlay","id":2397974,"node_id":"MDQ6VXNlcjIzOTc5NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2397974?v=4","gravatar_id":"","url":"https://api.github.com/users/SylvainCorlay","html_url":"https://github.com/SylvainCorlay","followers_url":"https://api.github.com/users/SylvainCorlay/followers","following_url":"https://api.github.com/users/SylvainCorlay/following{/other_user}","gists_url":"https://api.github.com/users/SylvainCorlay/gists{/gist_id}","starred_url":"https://api.github.com/users/SylvainCorlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylvainCorlay/subscriptions","organizations_url":"https://api.github.com/users/SylvainCorlay/orgs","repos_url":"https://api.github.com/users/SylvainCorlay/repos","events_url":"https://api.github.com/users/SylvainCorlay/events{/privacy}","received_events_url":"https://api.github.com/users/SylvainCorlay/received_events","type":"User","site_admin":false},"created_at":"2018-08-10T15:37:10Z","updated_at":"2018-08-10T15:37:10Z","author_association":"NONE","body":"hey all, we actually might have a more elegant discussion which should enable capturing rich outputs of non-python kernels, using a similar method as the execute preprocessor of nbconvert."}}
{"actor":{"display_login":"SylvainCorlay"}}