Python HWP 파일 파서 및 텍스트 추출 라이브러리
Project description
helper_hwp
Python으로 작성된 HWP (한글 문서) 파일 파서 및 텍스트 추출 라이브러리입니다.
특징
- HWP 5.x 포맷 지원 (CFB 기반)
- 텍스트 추출 및 마크다운 변환
- 표, 페이지 단위 파싱 지원
- 단위 변환 유틸리티 제공 (HWPUNIT ↔ cm/inch/px)
설치
pip install helper-hwp
또는 소스에서 설치:
git clone https://github.com/c0z0c/helper_hwp.git
cd helper_hwp
pip install -e .
빠른 시작
텍스트 추출
from helper_hwp import hwp_to_txt
# HWP 파일에서 텍스트 추출
text = hwp_to_txt('example.hwp')
print(text)
마크다운 변환
from helper_hwp import hwp_to_markdown
# HWP 파일을 마크다운으로 변환
markdown = hwp_to_markdown('example.hwp')
print(markdown)
문서 객체 사용
from helper_hwp import open_hwp
# HWP 문서 열기
doc = open_hwp('example.hwp')
# 문단 단위 순회
for paragraph in doc.iter_paragraphs():
print(paragraph.text)
# 표 단위 순회
for table in doc.iter_tables():
print(table.rows)
사용 예제
더 많은 예제는 examples 디렉토리를 참조하세요:
문서
요구사항
- Python 3.8 이상
- olefile >= 0.46
- pycryptodome >= 3.15.0
라이센스
이 프로젝트는 Apache License 2.0 라이센스 하에 배포됩니다.
누구나 자유롭게 사용하고 수정할 수 있으며, 사용 시 출처를 표기해 주세요.
출처: https://github.com/c0z0c/helper_hwp
자세한 내용은 LICENSE 파일을 참조하세요.
기여
프로젝트에 대한 기여를 환영합니다! 기여 방법은 개발자 문서를 참조하세요.
변경 이력
변경 이력은 CHANGELOG.md를 참조하세요.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file helper_hwp-0.5.1.tar.gz.
File metadata
- Download URL: helper_hwp-0.5.1.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b53191c3656b67e4f562245e200556f302023d938ea7156a451179b14247938
|
|
| MD5 |
6deea36948db676285d4399d5f40b205
|
|
| BLAKE2b-256 |
e45c7354113613dcc8741ae282120d1d644ec511c4fed64a562773e4352c14dd
|
File details
Details for the file helper_hwp-0.5.1-py3-none-any.whl.
File metadata
- Download URL: helper_hwp-0.5.1-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca009120f204157d5221f4d5d622245ae38eca8197ac7306e36c1c4ddc5f8c5
|
|
| MD5 |
039694799b3a724835de7b4f34638338
|
|
| BLAKE2b-256 |
1d36848d80e470125bae36089387e07f24de58bd8d04141110f278df59abe3da
|