Skip to content

Instantly share code, notes, and snippets.

@ryneches
Created August 29, 2022 08:33
Show Gist options
  • Save ryneches/6fca27fecc9d64a8e731214c069095f1 to your computer and use it in GitHub Desktop.
Save ryneches/6fca27fecc9d64a8e731214c069095f1 to your computer and use it in GitHub Desktop.
Handlebars template for converting Jupyter Notebook JSON blobs into Markdown
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

{{#each cells}} {{#if ( eq this.cell_type "markdown" ) }} {{#each this.source}}{{this}}{{/each}} {{/if}} {{#if ( eq this.cell_type "code" ) }} In [ {{this.execution_count}} ] : ''' {{#each this.source}}{{this}}{{/each}} ''' Out : ''' {{#each this.outputs}} {{#if ( eq this.output_type "stream" )}} {{#each this.text}}{{this}}{{/each}} {{/if}} {{/each}} ''' {{/if}} {{/each}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment