{"id":1682,"date":"2024-06-12T13:23:03","date_gmt":"2024-06-12T11:23:03","guid":{"rendered":"https:\/\/inseri.swiss\/?p=1682"},"modified":"2025-11-26T13:23:03","modified_gmt":"2025-11-26T13:23:03","slug":"export-block","status":"publish","type":"post","link":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/2024\/06\/export-block\/","title":{"rendered":"Export Block"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The Export Block makes the post or page content <strong>open access<\/strong> by allowing the visitors to download the corresponding <a href=\"https:\/\/wordpress.github.io\/wordpress-playground\/blueprints-api\/using-blueprints\/\">blueprint.json<\/a> and WXR file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an example we will consider the <a href=\"https:\/\/zi.uzh.ch\/whp\/science-it\/inseri\/2023\/03\/plotly-chart-block\/\" data-type=\"post\" data-id=\"360\">Plotly Chart Block<\/a> post. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-inseri-core-text-editor\" data-attributes=\"{&quot;blockId&quot;:&quot;KaCV6b1xBVHc4v4LUH6u1&quot;,&quot;content&quot;:&quot;%7B%0A%20%20%20%20%22data%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22x%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22giraffes%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22orangutans%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22monkeys%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22y%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2020%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2014%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2023%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22bar%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22layout%22%3A%7B%22height%22%3A500%7D%0A%7D&quot;,&quot;contentType&quot;:&quot;application\/json&quot;,&quot;editable&quot;:true,&quot;height&quot;:150,&quot;isVisible&quot;:true,&quot;label&quot;:&quot;Feel free to edit the JSON text below&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;textEditor&quot;}}\">is loading &#8230;<\/div>\n\n\n\n<div class=\"wp-block-inseri-core-plotly\" data-attributes=\"{&quot;blockId&quot;:&quot;hrbGpj0iDhYFnrD124Ene&quot;,&quot;height&quot;:500,&quot;inputConfig&quot;:&quot;&quot;,&quot;inputData&quot;:&quot;&quot;,&quot;inputFull&quot;:&quot;KaCV6b1xBVHc4v4LUH6u1\/content&quot;,&quot;inputLayout&quot;:&quot;&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;plotly&quot;},&quot;outputs&quot;:[[&quot;onClick&quot;,&quot;click&quot;]]}\">is loading &#8230;<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">You can try to click on one of the columns and the corresponding value will be shown dynamically below in the <strong>Text Viewer<\/strong> block (some small manipulation was done in the <strong>Python Code<\/strong> block, which runs automatically and is invisible to the visitor). Also, feel free to edit the JSON input used to generate the plot.<\/p>\n\n\n\n<div class=\"wp-block-inseri-core-python\" data-attributes=\"{&quot;autoTrigger&quot;:true,&quot;blockId&quot;:&quot;sopWCY58UGn8FxJdAvbIA&quot;,&quot;content&quot;:&quot;res%20%3D%20%7Bselected_value%5B0%5D%5B%22x%22%5D%3Aselected_value%5B0%5D%5B%22y%22%5D%7D&quot;,&quot;editable&quot;:false,&quot;height&quot;:63,&quot;inputCode&quot;:&quot;&quot;,&quot;inputs&quot;:{&quot;selected_value&quot;:&quot;hrbGpj0iDhYFnrD124Ene\/onClick&quot;},&quot;isVisible&quot;:false,&quot;label&quot;:&quot;&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;python&quot;},&quot;mode&quot;:&quot;editor&quot;,&quot;outputs&quot;:[[&quot;res&quot;,&quot;application\/json&quot;]]}\">is loading &#8230;<\/div>\n\n\n\n<div class=\"wp-block-inseri-core-text-viewer\" data-attributes=\"{&quot;blockId&quot;:&quot;FDCPJq1oSMjVGD5MHLfzq&quot;,&quot;content&quot;:&quot;&quot;,&quot;height&quot;:60,&quot;inputKey&quot;:&quot;sopWCY58UGn8FxJdAvbIA\/res&quot;,&quot;label&quot;:&quot;Selected Column and the corresponding value&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;textViewer&quot;}}\">is loading &#8230;<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">By clicking on the Export button bellow you will be able to download a zip file with the details needed to recreate this post. Unzip the file and read the <code><strong>readme.md<\/strong><\/code> file.<\/p>\n\n\n\n<div class=\"wp-block-inseri-core-export\" data-attributes=\"{&quot;blockId&quot;:&quot;x2IXtbOy2a2dx2dR5CxW1&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;export&quot;},&quot;postId&quot;:1682}\">is loading &#8230;<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">For more details please see the corresponding\u00a0<a href=\"https:\/\/inseri-swiss.github.io\/inseri-core-wp\/blocks\/export\/\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f56f613f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-inseri-core-share alignright\" data-attributes=\"{&quot;align&quot;:&quot;right&quot;,&quot;blockId&quot;:&quot;KTETwIissQyi0jL3ZpuwV&quot;,&quot;copiedText&quot;:&quot;Copied&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;share&quot;},&quot;showIcon&quot;:true,&quot;text&quot;:&quot;Share&quot;}\">is loading &#8230;<\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Export Block makes the post or page content open access by allowing the visitors to download the corresponding blueprint.json and WXR file. As an example we will consider the Plotly Chart Block post. You can try to click on one of the columns and the corresponding value will be shown dynamically below in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[40,47,48,50,52,53],"class_list":["post-1682","post","type-post","status-publish","format-standard","hentry","category-inseri-core-block","tag-export","tag-plotly-chart","tag-python-code","tag-share","tag-text-editor","tag-text-viewer"],"_links":{"self":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts\/1682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/comments?post=1682"}],"version-history":[{"count":1,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts\/1682\/revisions"}],"predecessor-version":[{"id":2132,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts\/1682\/revisions\/2132"}],"wp:attachment":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/media?parent=1682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/categories?post=1682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/tags?post=1682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}