Skip to content

Feature request: Force execution of all code cells without adding .cb-run and .cb-nb #59

@mfhepp

Description

@mfhepp

Hi,
it would be handy to have a command-line option that automatically adds either

  • .cb-run
    or
  • .cb-run and .cb-nb

or the respective behavior to all Python code block.

Motivation: I often create Python materials in Pandoc markdown and would want to produce a lecture note with the code snippets and their effects side-by-side. While I could manually add {.python .cb-run .cb-nb} to each code block, that seems like unnecessary redundancy. Before I start writing a custom Pandoc filter that adds .cb-run and .cb-nb to all code blocks in a Pandoc document, I wanted to check if there is another way with batteries supplied.

Implementation: I would use a CLI option like

  • all supported code block types: --runall
  • all code blocks of a single type --runall python
  • all code blocks of a a list of types --runall python,bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions