{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/114","repository_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery","labels_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/114/comments","events_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/114/events","html_url":"https://github.com/sphinx-gallery/sphinx-gallery/pull/114","id":143758801,"number":114,"title":"Allow user to choose thumbnail image","user":{"login":"adrn","id":583379,"avatar_url":"https://avatars.githubusercontent.com/u/583379?v=3","gravatar_id":"","url":"https://api.github.com/users/adrn","html_url":"https://github.com/adrn","followers_url":"https://api.github.com/users/adrn/followers","following_url":"https://api.github.com/users/adrn/following{/other_user}","gists_url":"https://api.github.com/users/adrn/gists{/gist_id}","starred_url":"https://api.github.com/users/adrn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrn/subscriptions","organizations_url":"https://api.github.com/users/adrn/orgs","repos_url":"https://api.github.com/users/adrn/repos","events_url":"https://api.github.com/users/adrn/events{/privacy}","received_events_url":"https://api.github.com/users/adrn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-26T23:22:35Z","updated_at":"2016-03-31T17:03:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/pulls/114","html_url":"https://github.com/sphinx-gallery/sphinx-gallery/pull/114","diff_url":"https://github.com/sphinx-gallery/sphinx-gallery/pull/114.diff","patch_url":"https://github.com/sphinx-gallery/sphinx-gallery/pull/114.patch"},"body":"This implements a way for the example-writer to specify which figure is displayed as the thumbnail when an example script generates multiple figures.\r\n\r\nThis is a bit of a hack and may not make sense to merge in as is, but it's at least something to start discussion. The basic idea with this implementation is that inside the docstring of a given example script, you can add a key:value pair, e.g., `thumbnail: 3` that specifies which figure in a given example to display as the thumbnail. \r\n\r\nLike I said: this is a hack. Right now, this uses a regexp to pick out the \"thumbnail:\" block. A nicer way to move forward might be to think about how you want to represent module-level, arbitrary configuration data or metadata in example files. Then, this thumbnail tag could just fit in that way. Thoughts welcome!\r\n\r\ncc @keflavich"},"comment":{"url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/comments/204023387","html_url":"https://github.com/sphinx-gallery/sphinx-gallery/pull/114#issuecomment-204023387","issue_url":"https://api.github.com/repos/sphinx-gallery/sphinx-gallery/issues/114","id":204023387,"user":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T17:03:45Z","updated_at":"2016-03-31T17:03:45Z","body":"> I'd rather use a comment, because if we use the docstring, the info will be printed in the text of the example.\r\n\r\nFair point actually for examples that do `print(__doc__)` ..."}}