/gherkin-paperwork

Various experiments around the gherkin-official python module to produce documentation out of Gherkin files.

Primary LanguagePython

Generating paperwork from Gherkin files

Authors: Florian Dupeyron <florian.dupeyron@mugcat.fr>
Date: May 2022

This repository regroups various experiments aiming at giving a simple way of generating documentation from Gherkin files, using the canonical gherkin-python python module.

Generate the example markdown file

  1. Install the required dependencies:
    pip install gherkin
    pip install tabulate
  2. Execute the script!
    python3 print_md_visitor.py
  3. You can use pandoc to convert it to HTML:
    pandoc -s -o output.html output.md

Scripts and signification

Script name Role
print_ast.py Print the output AST from cucumber's gherkin parser
print_steps.py Print the restructured tree from gherkin_paperwork
print_md.py Simple script that takes that tree and prints markdown code
print_md_visitor.py Cleaner script using the NodeVisitor contraption to correctly print out markdown code