Word Format Standardize
Convert a user-uploaded .docx into the target format and return the converted .docx.
Workflow
- Confirm the source file is a
.docx. - Run
scripts/convert_to_house_style.pywith the input file and a target output path. - If the script exits with code
2, tell the user which fonts are missing and do not return a converted file. - If conversion succeeds, return the generated
.docx. - Mention that complex layout documents should still be manually checked after conversion.
Command
python scripts/convert_to_house_style.py `
--input "C:\path\to\input.docx" `
--output "C:\path\to\output.docx"
Converter Guarantees
- Check required fonts before conversion.
- Apply page setup, theme, styles, font table, and section settings derived from the bundled template bundle.
- Normalize paragraphs into title, body, heading 1-4, attachment label, date/signature, and table text using deterministic heuristics.
- Return a hard failure instead of pretending conversion worked when critical fonts are missing.
Resources
assets/template-bundle.json: text-only export of the reference template settings required for ClawHub upload.references/format-rules.md: concise formatting rules and heuristics.scripts/convert_to_house_style.py: converter script.