Skip to main content

helper_hwp

Python으로 작성된 HWP (한글 문서) 파일 파서 및 텍스트 추출 라이브러리입니다.

특징

  • HWP 5.x 포맷 지원 (CFB 기반)
  • HWP 97 (V3.00) 포맷 지원
  • HWPX / OWPML 포맷 지원
  • 파일 포맷 자동 감지 (open_hwp)
  • 텍스트 추출 및 마크다운 변환
  • PDF 변환 지원 (to_pdf, playwright 필요)
  • CLI 명령어 제공: hwp2txt, hwp2md, hwp2html, hwp2doc, hwp2pdf
  • 표, 페이지 단위 파싱 지원
  • 단위 변환 유틸리티 제공 (HWPUNIT ↔ cm/inch/px)

설치

pip install helper-hwp

또는 소스에서 설치:

git clone https://github.com/c0z0c-helper/helper_hwp.git
cd helper_hwp
pip install -e .

빠른 시작

텍스트 추출

from helper_hwp import to_txt

# HWP / HWP97 / HWPX 포맷 자동 감지
text = to_txt('example.hwp')
print(text)

마크다운 변환

from helper_hwp import to_md

# HWP / HWP97 / HWPX 포맷 자동 감지
markdown = to_md('example.hwp')
print(markdown)

PDF 변환

from helper_hwp import to_pdf

# playwright 설치 필요: pip install playwright && playwright install chromium
to_pdf('example.hwp', 'output.pdf')

문서 객체 사용

from helper_hwp import open_hwp, ElementType

# HWP 문서 열기 (포맷 자동 감지)
with open_hwp('example.hwp') as doc:
    for etype, elem in doc.iter_tags():
        if etype == ElementType.PARAGRAPH:
            print(elem.text)

CLI 사용

hwp2txt example.hwp
hwp2md  example.hwp
hwp2pdf example.hwp

Examples

다음 예제를 참고하세요:

또는 소스 배포판(sdist)을 다운로드하여 확인:

pip download --no-deps helper-hwp
tar -xzf helper_hwp-*.tar.gz

문서

요구사항

  • Python 3.8 이상
  • olefile >= 0.46
  • pycryptodome >= 3.15.0

라이센스

이 프로젝트는 Apache License 2.0 라이센스 하에 배포됩니다.

누구나 자유롭게 사용하고 수정할 수 있으며, 사용 시 출처를 표기해 주세요.

출처: https://github.com/c0z0c-helper/helper_hwp

자세한 내용은 LICENSE 파일을 참조하세요.

기여

프로젝트에 대한 기여를 환영합니다! 기여 방법은 개발자 문서를 참조하세요.

변경 이력

변경 이력은 CHANGELOG.md를 참조하세요.

Metadata

Release files for helper-hwp 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for helper-hwp 0.6.1
File Size Uploaded Provenance Actions
helper_hwp-0.6.1.tar.gz 85.4 kB Without provenance Details for helper_hwp-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for helper-hwp 0.6.1
File Interpreter ABI Platform Actions
helper_hwp-0.6.1-py3-none-any.whl Python 3 none any Details for helper_hwp-0.6.1-py3-none-any.whl

Total release size: 173.0 kB

Release files / helper_hwp-0.6.1.tar.gz

Download URL helper_hwp-0.6.1.tar.gz
Size 85.4 kB
Tags Source
SHA-256 checksum
How to use checksums
55bb16d40a12a0a48640800a96d22c6fd0a0808cf27df3c1347fda752a2f06e5
BLAKE2b-256 checksum
How to use checksums
a1cd864c28a6dd133f6f88e7d668bcc1b91b09b3d71c95397eda17fa9e756414
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / helper_hwp-0.6.1-py3-none-any.whl

Download URL helper_hwp-0.6.1-py3-none-any.whl
Size 87.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cffd8fdbf949943d86a2471838a1f8c8fd9df141afe8c454fdeba91b1a09487e
BLAKE2b-256 checksum
How to use checksums
8277b927743cb42e5e492ab597e077285e2cf04f07e9067fa699cb9deef4d93e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for helper-hwp 0.6.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page