No project description provided
Project description
libhwp
rust로 작성된 python hwp 리더 라이브러리
본 제품은 한글과컴퓨터의 한/글 문서 파일(.hwp) 공개 문서를 참고하여 개발하였습니다.
API
find_all
- hwp
- hwp.sections[i]
- hwp.sections[i].paragraphs[i] 등에서 사용할 수 있습니다.
find_all('tag', recursive=Boolean)이며 recursive는 기본적으로 True입니다.
지원되는 tag
- paragraph: 문단
- table: 표
- caption: 캡션
- equation: 수식
- footnote: 각주
- endnote: 미주
- header: 머리말
- footer: 꼬리말
예
from libhwp import HWPReader
hwp = HWPReader('<파일 경로>')
# 모든 문단 출력 (표, 캡션 포함)
for paragraph in hwp.find_all('paragraph'):
print(paragraph)
# 표 내용 출력 (표 안의 표 포함)
for table in hwp.find_all('table'):
for cell in table.cells:
for paragraph in cell.paragraphs:
print(paragraph)
# 표 내용 출력 (표 안의 표 무시)
for table in hwp.find_all('table', recursive=False):
for cell in table.cells:
for paragraph in cell.paragraphs:
print(paragraph)
# 표 안의 표 내용 출력 방법 2
for table in hwp.find_all('table'):
for cell in table.cells:
for paragraph in cell.paragraphs:
print(paragraph)
# paragraph에서도 recursive 하게 찾을 수 있다
for p in paragraph.find_all('paragraph'):
print(p)
# 수식 내용 출력
for equation in hwp.find_all('equation'):
print(equation.script) # eg. f(x)= logx+sinx
# 문서에 사용된 파일 저장
for file in hwp.bin_data:
with open(file.name, 'wb') as f:
f.write(file.data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 libhwp-0.2.0.tar.gz.
File metadata
- Download URL: libhwp-0.2.0.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b91c4ec99d5f0f032d5600ddbeb4cf24f15d5728eddd72c78677472204c8372b
|
|
| MD5 |
d7b410f3e3fdbefac69958d9e9b265d2
|
|
| BLAKE2b-256 |
bf68b5abbc208cb7df26907411f4967c5e5f346edc6133449b06da1a09a45dfa
|
File details
Details for the file libhwp-0.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d72c7384af347c4cd1c17e4dfeea64042cdd3fc8cddaad6f4ca75f7291d19ae
|
|
| MD5 |
81751e759e80338e5d16754febc87caa
|
|
| BLAKE2b-256 |
7630c70f0dcbe1c48d31bd8af0d0b2922405d6fde2373e44a81291b6a6cea039
|
File details
Details for the file libhwp-0.2.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e747980e469cb93f554cf6358f79eaa6fc903148684dd75a7a7050f23d77b5a
|
|
| MD5 |
479cff49fb94045f28a2b921946be1fa
|
|
| BLAKE2b-256 |
4b7ab7ea6104ddd2529819226ebd9ee0a55252e56c33c7bc1ec7c7d08f2571c0
|
File details
Details for the file libhwp-0.2.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2a6ff481b328e8f67f1b794aaf2a5c40993eaadc4b028aa8ba99cd208d94325
|
|
| MD5 |
cc52754af686ff3a8d39ba02f496eebc
|
|
| BLAKE2b-256 |
bde7308ddbfc7b7fdc98a9a11c3d1625afb73d6824100553c56c1539f02d520a
|
File details
Details for the file libhwp-0.2.0-cp311-none-win_amd64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp311-none-win_amd64.whl
- Upload date:
- Size: 355.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
231b73394759458de86d18fe9de4e8192d66db458d3743eb94aa92bdbae5c469
|
|
| MD5 |
85acb745deafabb5ae8cd1a505267c1f
|
|
| BLAKE2b-256 |
91e0c4e410d2c4ed199de1bef887f9455c84341f3fe3f30d2945be0f9521a0ff
|
File details
Details for the file libhwp-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d09efc06eca77fd4ba31c0fe2827a951f12adf90fc0129622d348fb3d4ba3b2c
|
|
| MD5 |
f5ade605463027ef7ff6c7f57dc6750c
|
|
| BLAKE2b-256 |
e71e41b39c475fb1e0b9fa9970fce2b6eb2b54453b2636e54ad2929b83e3bda5
|
File details
Details for the file libhwp-0.2.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.
File metadata
- Download URL: libhwp-0.2.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 922.0 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0189f2b1130e153161fa9c74713494e7c107e4abea912aa75dec6a4f2d45cc40
|
|
| MD5 |
40498f3383d1c01d4420ad5dc782b109
|
|
| BLAKE2b-256 |
b8750fe9675dcbf64e388b263c836ba6d15a014744fe6b5f88e6124b9feeef31
|
File details
Details for the file libhwp-0.2.0-cp310-none-win_amd64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp310-none-win_amd64.whl
- Upload date:
- Size: 355.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cbb1c6175cda24208a5848c515b44f50c2f036e8e30e1fdb5e9325492bd32dc
|
|
| MD5 |
14c1dc6e9462cd52699fda4280ed5d64
|
|
| BLAKE2b-256 |
ea3c88d739ecd4616538af392246623646224076df266c700e9b76d8bc18d9f9
|
File details
Details for the file libhwp-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afaa5b5757e15a38dd158c73c72290a344b81a7fb433d3e2e2c8a46b1ddf95a2
|
|
| MD5 |
27463b2a7866e3047fb219c3456b49b0
|
|
| BLAKE2b-256 |
2ee0cc41d215115bc10cd82a5ee84477c8d307330254488acfbbc39d9778faf8
|
File details
Details for the file libhwp-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.
File metadata
- Download URL: libhwp-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 922.0 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7925367efd88bb5d8abcee362f2c04d838fbecb06c2af1cf526ceba7e5b2de45
|
|
| MD5 |
fa5409443893adaf0c0509db680c95b3
|
|
| BLAKE2b-256 |
e8311f3d30c8c86013ec89e506190ef23f1b5b4075e0edee7137a606a5f708d5
|
File details
Details for the file libhwp-0.2.0-cp39-none-win_amd64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp39-none-win_amd64.whl
- Upload date:
- Size: 355.6 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bfc650827006fedead591c27f03306cb8450dfc28b7ba012f000c38654b8d8b
|
|
| MD5 |
1a5c076babc56a40b79cc8171a39129e
|
|
| BLAKE2b-256 |
a8088c8d115fe8116b055c9d95afed56a345bb2f25a7bab61a866451f060e404
|
File details
Details for the file libhwp-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ed21ac8f184a74256355cc4e940ee0ff0d81308c41f0a38f99d72e7ab9ef2f
|
|
| MD5 |
abd0997105d68b36c13ad56a427189ad
|
|
| BLAKE2b-256 |
bb8b512d7998bc68197ae16cdd64bbf6ff06960ef74ac2ca841faa3a994b0f6a
|
File details
Details for the file libhwp-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.
File metadata
- Download URL: libhwp-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 922.9 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d28b55ab3333b546d2cbbbd7a43b953685ce31940261baf3c8fd29f475af9b8
|
|
| MD5 |
f3a98a954cfb58466591e22fbb8948ac
|
|
| BLAKE2b-256 |
07b6c6c4861a1ddea5886942827eece20ddb09768df8a3e24b371d9b4e4a3119
|
File details
Details for the file libhwp-0.2.0-cp38-none-win_amd64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp38-none-win_amd64.whl
- Upload date:
- Size: 355.7 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b42e12b59f12d701571760f505e5fc3f5dc2add13e54b61095e0164181899d04
|
|
| MD5 |
e9261c24a08b39f002a9df65bcf58033
|
|
| BLAKE2b-256 |
4b9737afaaaac1ae5a9bef33739d89185f2cd2c09ee72843f538b74974bacb96
|
File details
Details for the file libhwp-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc5011643cb3373a0ec9c813b54f1ced06561ae607a75b4eeede7414093132c4
|
|
| MD5 |
077f2296018f4585c15839f0d054a67e
|
|
| BLAKE2b-256 |
98e745e68762226e8f2d24d2414499de9a8fbd570b7e94bdf8f284aba16c8309
|
File details
Details for the file libhwp-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.
File metadata
- Download URL: libhwp-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 922.5 kB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae8c9f0a5bc563251f2a5bd4d3f80d2dba328677fa84c81012a4a40be92706e
|
|
| MD5 |
97db61f001670017b2304f656bad8fa6
|
|
| BLAKE2b-256 |
4a85095349f6d3fa299798d91561ac832ba0bad8d3a05a16770eb21ff37efdc9
|
File details
Details for the file libhwp-0.2.0-cp37-none-win_amd64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp37-none-win_amd64.whl
- Upload date:
- Size: 355.6 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
257b13c1f3f22b10ec80613ef410df1c35f15a5c470602558f46d9de214e9850
|
|
| MD5 |
c85834fab12eff48843d2988e5ebe0a2
|
|
| BLAKE2b-256 |
40d1ff6fa9e0650fe642d5e9e324bf5b2255c180135326090a5341eedb354f89
|
File details
Details for the file libhwp-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: libhwp-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d06c281fd1021c674798081cee9784a2df8df4a6086c802cfa0d4302b78ccd1
|
|
| MD5 |
60e966010e83c4e6801833d552a1c51a
|
|
| BLAKE2b-256 |
f92301c6417d7dfefe37d897f92fdcb1225b8cf89b874eae63e726e3d9059d45
|
File details
Details for the file libhwp-0.2.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.
File metadata
- Download URL: libhwp-0.2.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 922.6 kB
- Tags: CPython 3.7m, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ce37c69239d063e8dd47daae1810673182deb823556cf82d7942de14c034154
|
|
| MD5 |
b04d25bc58a533b839b091b0400a9f0c
|
|
| BLAKE2b-256 |
de08b454838d53ef41c22d1a0249b7e403b0bb999aa882e2da8540336017791a
|