Skip to content

md_generator.word API Reference

Summary

Item Value
Purpose Convert DOCX documents to Markdown with optional embedded images
CLI md-word
Extra word
Tier simple

Quick CLI reference

Argument Type Required Default Choices Help
input_docx Path required — — Input .docx path
output_md Path required — — Output .md path
--images-dir Path optional None — Directory for extracted images (default: /images)
--no-page-break-hr flag optional false — Do not map page-break-like spans to horizontal rules
-v flag optional false — —

Primary symbols

Symbol Kind Notes
convert_docx_to_markdown callable —
WordToMdSettings callable —

Python API (mkdocstrings)

word

convert_docx_to_markdown

convert_docx_to_markdown(input_docx: Path, output_md: Path, *, images_dir: Path | None = None, page_break_as_hr: bool = True, verbose: bool = False, conversion_log_path: Path | None = None, style_map: str | None = None) -> ConversionResult

Convert .docx to Markdown next to images_dir, optionally write conversion log.

output_md parent directory is created as needed. Image paths in Markdown are relative to output_md's parent (e.g. images/<id>.png).