Skip to content

genpandoc CLI

Generate Pandoc-ready Markdown from DMAIC documents.

Installation

go install github.com/grokify/structured-goals/cmd/genpandoc@latest

Usage

genpandoc -i input.json -o output.md [options]

Options

Flag Description Default
-i, --input Input JSON file (required) -
-o, --output Output Markdown file (required) -
--initiatives Include initiatives section true
--root-causes Include root causes true
--control-limits Show control limits true

Examples

Basic Usage

genpandoc -i metrics.json -o report.md

Minimal Report

genpandoc -i metrics.json -o report.md \
  --initiatives=false \
  --root-causes=false

Generate PDF

genpandoc -i metrics.json -o report.md
pandoc report.md -o report.pdf --pdf-engine=lualatex

Output Format

The generated Markdown includes YAML frontmatter:

---
title: "Document Title"
author: "Owner Name"
date: "Period"
geometry:
  - margin=2cm
fontfamily: helvet
fontsize: 11pt
documentclass: article
header-includes:
  - \renewcommand{\familydefault}{\sfdefault}
  - \usepackage{booktabs}
  - \usepackage{longtable}
toc: true
numbersections: true
---

Pandoc Conversion

PDF with LuaLaTeX

pandoc report.md -o report.pdf --pdf-engine=lualatex

DOCX

pandoc report.md -o report.docx

HTML

pandoc report.md -o report.html --standalone

Requirements

For PDF generation:

Install on macOS:

brew install pandoc
brew install --cask mactex

Install on Ubuntu:

sudo apt install pandoc texlive-full