Skip to main content

YAML-to-Word document generator for automated pipelines and LLM-driven content creation

Project description

docsmith

YAML-in, Word-out. Define document content in a simple YAML schema and docsmith forges it into a professionally formatted Word (.docx) file.

Why docsmith?

docsmith is built for automated pipelines and LLM-driven content generation. The YAML input format is deliberately simple -- flat, predictable, and easy for any language model or script to produce. No template engine, no programming required. Hand it a YAML file, get a Word document back.

Use cases:

  • LLM document generation -- have an AI produce structured YAML, then render to Word
  • CI/CD pipelines -- generate reports, proposals, or compliance documents as build artifacts
  • Batch processing -- convert a directory of YAML files to Word in one pass
  • Content-first authoring -- focus on content in YAML, let docsmith handle formatting

Installation

pipx install docsmith

Or with pip:

pip install docsmith

Usage

# Generate a Word document from a YAML source
docsmith input.yaml

# Specify output directory
docsmith input.yaml -o output/

Also works as a Python module:

python -m docsmith input.yaml

YAML Document Format

title: "Document Title"
subtitle: "Subtitle text"
status: "Draft"

content:
  - heading: "Section Heading"
    level: 1

  - text: "Paragraph with **bold** and *italic* support."

  - bullets:
      - "First bullet point"
      - "Second bullet with **bold**"

  - numbered:
      - "Step one"
      - "Step two"

  - table:
      headers: ["Column A", "Column B"]
      rows:
        - ["Cell 1", "Cell 2"]
        - ["Cell 3", "Cell 4"]

  - decision: "A decision callout that needs stakeholder input"

Supported Block Types

Block Purpose
heading Section heading (level 1-4)
text Paragraph with inline bold/italic
bullets Unordered list
numbered Ordered list
table Table with headers and rows
decision Red decision callout

Document Metadata

docsmith sets SharePoint/OneDrive-compatible document properties:

  • dc:creator and cp:lastModifiedBy set to "docsmith"
  • dcterms:created and dcterms:modified set to generation timestamp
  • dc:title and dc:subject populated from YAML metadata

Future Output Formats

Word is the first format. The YAML source schema is designed to be renderable to multiple output formats (PDF, HTML, Markdown) in future versions.

License

GPL-3.0-or-later. See LICENSE for details.

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

docsmith-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docsmith-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file docsmith-0.1.0.tar.gz.

File metadata

  • Download URL: docsmith-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for docsmith-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dcbca47f912e8b39532fc5e82167e41d6b62876cb59e475cccd26d947cf1752b
MD5 519ce8c81eda109ba0ebe1d68926a07c
BLAKE2b-256 12545aa1171d58260c6d09e04c30af777fc84ea2809928301af2c15409b4d20b

See more details on using hashes here.

File details

Details for the file docsmith-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docsmith-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for docsmith-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48dcab1339c32b3b094df4f2287da8f0fd1098fbafb6a420a16b8ea9a30907cb
MD5 5d3952d46623285df522460aed290a3d
BLAKE2b-256 35cd99c20e5db548c3a74a5c0d9701b3032320b28db4ad11e5eeefb8ea16eb49

See more details on using hashes here.

Supported by

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