docx-to-hlzlisted
Install: claude install-skill lsj4232/KR_PATENT_SKILL
# docx-to-hlz — 워드 명세서 → 특허청 편집기(.hlz) 변환
완성된 한국 특허 명세서 `.docx`를 특허청 전자출원 편집기가 여는 **`.hlz`**(ZIP: KIPO XML + 도면)로 변환한다.
## 사용법
```bash
python "<skill>/scripts/docx2hlz.py" "명세서.docx" # → 같은 폴더에 명세서.hlz
python "<skill>/scripts/docx2hlz.py" "명세서.docx" -o out.hlz
```
의존성: `python-docx`, `Pillow`(png/tiff 재인코딩·크기추정용).
변환 후 사용자가 편집기에서 **[파일 > 열기]로 .hlz 선택**(또는 창에 드래그&드롭). 편집기 GUI 클릭은
자동화 불가이므로 여는 것은 사용자가 한다.
## 입력 워드 전제
- KIPO 별지 서식 **【식별항목】 태그**로 섹션이 구분돼 있어야 한다(위 description의 12개 태그).
- 래퍼 태그(【발명의 설명】【발명의 내용】【요약서】)는 자식만 쓰고 자신은 버린다.
- 비표준 소제목(예 【1. 용어의 정의…】 탐색창용 챕터)은 본문 문단으로 흡수(대괄호 제거).
- 표(table)는 미지원(현재 대상 명세서에 표가 없어 미구현) — 표 있는 건은 확장 필요.
## 산출 포맷 핵심 (application-body DTD)
```
<KIPO keapsVersion="5.6" editorKind="K" pageCount wi imgApply="N" xmlns="http://www.kipo.go.kr">
<PatentCAFDOC docflag="1.0" documentID="숫자">
<description>
<invention-title>한글{ENGLISH}</invention-title>
<technical-field><p num="0001">…</p></technical-field>
<background-art>…</background-art>
<summary-of-invention><tech-problem/><tech-solution/><advantageous-effects/></summary-of-invention>
<description-of-drawings><p>도 1은…<br/>도 2는…</p></description-of-drawings>
<description-of-embodiments><p num=…>…</p></description-of-embodiments>
</description>
<claims><claim num="1"><claim-text>…단계;<br/>…을 특징으로 하는 ….</claim-text></claim></claims>
<abstract><summary><p num="0001a"/></summary><abstract-figure><figref num="3"/></abstract-figure></abstract>
<drawings><figure n