hwp2md
Python용 HWP/HWPX to Markdown 변환기.
한글(HWP 5.0 및 HWPX) 파일을 LLM에 최적화된 깔끔한 Markdown으로 변환합니다.
주요 기능
- ✅ HWP 5.0 및 HWPX 파일에서 텍스트 추출
- ✅ HWPX (ZIP+XML) 형식 지원 (확장자 자동 감지)
- ✅ 표를 Markdown 형식으로 변환
- ✅ 문서 구조 보존
- ✅ 셀 병합 처리 (LLM 최적화를 위한 내용 반복)
- ✅ CLI 도구로 빠른 변환
설치
# pip 사용
pip install hwp2md
# uv 사용
uv add hwp2md
사용법
CLI
# Markdown으로 변환 (stdout 출력)
hwp2md document.hwp
# HWPX 파일 변환 (자동 감지)
hwp2md document.hwpx
# 파일로 저장
hwp2md document.hwp -o output.md
hwp2md document.hwpx -o output.md
# uvx로 설치 없이 실행
uvx hwp2md document.hwp
Python API
from hwp2md import convert
# HWP 또는 HWPX 변환 (확장자로 자동 감지)
markdown = convert("document.hwp")
markdown = convert("document.hwpx")
print(markdown)
제한사항
- HWP 5.0 및 HWPX 지원 - 이전 HWP 형식(HWP 3.0, HWP 97, HWP 2002 등)은 지원하지 않음
- 레거시 HWP 파일은 한컴오피스에서 HWP 5.0 또는 HWPX로 변환 가능
- 레거시 형식 감지 시 오류 발생
- 텍스트 & 표 - 현재 텍스트와 표만 추출하며, 이미지 및 복잡한 개체는 건너뜀
- 한국어 중심 - 한국어 문서에 최적화 (UTF-16LE 인코딩)
- 기본 서식만 - 글꼴, 색상, 고급 스타일은 보존하지 않음
개발
# 의존성 설치
uv sync
# CLI 실행
uv run hwp2md document.hwp
# 테스트 실행
uv run pytest
라이선스
MIT
Metadata
Release files for hwp2md 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hwp2md-1.0.1.tar.gz | 23.1 kB | Without provenance | Details for hwp2md-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hwp2md-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for hwp2md-1.0.1-py3-none-any.whl |
Total release size: 41.2 kB
Release files / hwp2md-1.0.1.tar.gz
| Download URL | hwp2md-1.0.1.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d67d6203d3b8be6e639c576c602652a1e48c1f7b8cf0b49c0c65dd506ea02d44
|
|
BLAKE2b-256 checksum How to use checksums |
3249a3123184b3b6444cd569bb7d7d964eae9af557990da6bebd46275f4f0747
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / hwp2md-1.0.1-py3-none-any.whl
| Download URL | hwp2md-1.0.1-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca313a39c508a3ba619738035f36b151d00bc9ba17bb702aa899592064ade6a6
|
|
BLAKE2b-256 checksum How to use checksums |
3b31aec80e7ca0762b6418569a7059036de4a0c19af447760b655bec001c53d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for hwp2md 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.