Skip to main content

A command line tool which allows you to run the code in your markdown files to ensure that readers always have access to working code.

Project description

Docrunner

A command line tool which allows you to run the code in your markdown files to ensure that readers always have access to working code.

What does it do?

Docrunner goes through your markdown file and runs any code in it, providing you safe testing for any markdown documentation. You can specify the path to the markdown file, along with other options, with flags.

Installation

Use the package manager pip to install docrunner.

pip install docrunner

QuickStart

py -m docrunner --help

or

docrunner

Language Specific Help

For help on a specific language, run:

docrunner <language> --help

Python Example

docrunner python --markdown-path example/example.md --multi-file

This command executes all python within your README markdown file and does so by putting each snippet of python from your README into a separate file, and running each file. If you don't want each snippet in a separate python file, just remove the --multi-file option.

Contributing and Local Development

If you would like to contribute to docrunner please follow these instructions to set a local development environment for docrunner on your system

  1. Clone this repository
  2. Install poetry, a dependency management tool, with pip if it is not already installed:
pip install poetry
  1. Install the necessary packages for the project with:
poetry install
  1. To run the docrunner cli tool in development, run:
poetry run docrunner --help
  1. You're all set! You can now edit source code within the docrunner directory
  2. (Testing CLI Tool) Run the usage example with:
poetry run docrunner <language> --markdown-path example/example.md

For larger changes like adding support for another language, please open an issue here

Supported Languages

  • Python
  • Javascript
  • Typescript
  • Dart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docrunner-0.1.4.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

docrunner-0.1.4-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page