build_hwpx
Generate HWPX files from templates, overriding header styles and section content via XML to produce a validated archive.
Instructions
Build an HWPX file from a template and optional XML overrides.
Workflow:
Start from the base template skeleton.
Optionally overlay a document-type template (gonmun/report/minutes).
Optionally override header.xml (styles) and/or section0.xml (body).
Pack as a valid HWPX archive and validate.
When a user provides a reference HWPX, first call analyze_hwpx() and extract_hwpx_xml() to get the header/section XML, then write a new section0.xml with only the required text changes, and pass it here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Document title written into content.hpf metadata. | |
| creator | No | Document creator written into content.hpf metadata. | |
| template | No | Document type template — one of: gonmun, report, minutes. Leave empty for plain base template. | |
| header_xml | No | Absolute path to a custom header.xml file (styles). Leave empty to use the template's default header. | |
| output_hwpx | Yes | Absolute path for the output .hwpx file. | |
| section_xml | No | Absolute path to a custom section0.xml file (body content). Leave empty to use the template's default section. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |