python-hwpx 2.9.0__tar.gz → 2.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_hwpx-2.9.1/LICENSE +178 -0
- python_hwpx-2.9.1/NOTICE +14 -0
- {python_hwpx-2.9.0/src/python_hwpx.egg-info → python_hwpx-2.9.1}/PKG-INFO +126 -80
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/README.md +120 -75
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/pyproject.toml +6 -6
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/__init__.py +1 -0
- python_hwpx-2.9.1/src/hwpx/data/Skeleton.hwpx +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/document.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/opc/package.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/opc/relationships.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/opc/xml_utils.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/__init__.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/body.py +23 -1
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/common.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/document.py +150 -29
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/header.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/header_part.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/memo.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/namespaces.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/paragraph.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/parser.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/schema.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/section.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/table.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/oxml/utils.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/package.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/templates.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/__init__.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/archive_cli.py +1 -0
- python_hwpx-2.9.1/src/hwpx/tools/exporter.py +169 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/object_finder.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/package_validator.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/page_guard.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/table_navigation.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/template_analyzer.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/text_extract_cli.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/text_extractor.py +5 -1
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/validator.py +1 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1/src/python_hwpx.egg-info}/PKG-INFO +126 -80
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/python_hwpx.egg-info/SOURCES.txt +4 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_document_formatting.py +57 -2
- python_hwpx-2.9.1/tests/test_hp_tab_support.py +64 -0
- python_hwpx-2.9.1/tests/test_id_generator_range.py +32 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_packaging_license_metadata.py +1 -1
- python_hwpx-2.9.1/tests/test_skeleton_template_ids.py +25 -0
- python_hwpx-2.9.0/LICENSE +0 -32
- python_hwpx-2.9.0/src/hwpx/data/Skeleton.hwpx +0 -0
- python_hwpx-2.9.0/src/hwpx/tools/exporter.py +0 -272
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/setup.cfg +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/py.typed +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/_schemas/header.xsd +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/hwpx/tools/_schemas/section.xsd +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/python_hwpx.egg-info/dependency_links.txt +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/python_hwpx.egg-info/entry_points.txt +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/python_hwpx.egg-info/requires.txt +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/src/python_hwpx.egg-info/top_level.txt +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_coverage_targets.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_document_context_manager.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_document_save_api.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_gap_closure_tools.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_inline_models.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_integration_hwpx_compatibility.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_integration_roundtrip.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_memo_and_style_editing.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_new_features.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_opc_package.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_oxml_parsing.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_packaging_py_typed.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_paragraph_section_management.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_repr_snapshots.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_section_headers.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_split_merged_cell.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_table_navigation.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_tables_default_border.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_text_extractor_annotations.py +0 -0
- {python_hwpx-2.9.0 → python_hwpx-2.9.1}/tests/test_version_metadata.py +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Copyright 2025-2026 airmang (Dr. Wily)
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf of
|
|
173
|
+
any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
python_hwpx-2.9.1/NOTICE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
python-hwpx
|
|
2
|
+
Copyright 2025-2026 airmang
|
|
3
|
+
|
|
4
|
+
This product includes software developed by airmang.
|
|
5
|
+
Licensed under the Apache License, Version 2.0.
|
|
6
|
+
|
|
7
|
+
────────────────────────────────────────
|
|
8
|
+
DISCLAIMER — HWPX Format
|
|
9
|
+
|
|
10
|
+
"HWPX" is the document format specified and trademarked by
|
|
11
|
+
Hancom Inc. (한글과컴퓨터). This project is an independent,
|
|
12
|
+
unofficial implementation and is not affiliated with, endorsed by,
|
|
13
|
+
or sponsored by Hancom Inc.
|
|
14
|
+
────────────────────────────────────────
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-hwpx
|
|
3
|
-
Version: 2.9.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 2.9.1
|
|
4
|
+
Summary: 한글 없이 HWPX 문서를 열고, 편집하고, 생성하고, 검증하는 Python 자동화 라이브러리
|
|
5
5
|
Author: python-hwpx Maintainers
|
|
6
|
-
License-Expression:
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/airmang/python-hwpx
|
|
8
|
-
Project-URL: Documentation, https://github.
|
|
8
|
+
Project-URL: Documentation, https://airmang.github.io/python-hwpx/
|
|
9
9
|
Project-URL: Issues, https://github.com/airmang/python-hwpx/issues
|
|
10
|
-
Keywords: hwp,hwpx,hancom,opc,xml
|
|
10
|
+
Keywords: hwp,hwpx,hancom,opc,xml,document-automation,validation,template
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -19,6 +19,7 @@ Classifier: Topic :: Text Processing :: Markup :: XML
|
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
+
License-File: NOTICE
|
|
22
23
|
Requires-Dist: lxml<6,>=4.9
|
|
23
24
|
Provides-Extra: dev
|
|
24
25
|
Requires-Dist: build>=1.0; extra == "dev"
|
|
@@ -36,74 +37,127 @@ Dynamic: license-file
|
|
|
36
37
|
<p align="center">
|
|
37
38
|
<h1 align="center">python-hwpx</h1>
|
|
38
39
|
<p align="center">
|
|
39
|
-
<strong
|
|
40
|
+
<strong>한글 없이 HWPX 문서를 Python으로 읽고, 편집하고, 생성하고, 검증합니다.</strong>
|
|
40
41
|
</p>
|
|
41
42
|
<p align="center">
|
|
42
43
|
<a href="https://pypi.org/project/python-hwpx/"><img src="https://img.shields.io/pypi/v/python-hwpx?color=blue&label=PyPI" alt="PyPI"></a>
|
|
43
44
|
<a href="https://pypi.org/project/python-hwpx/"><img src="https://img.shields.io/pypi/pyversions/python-hwpx" alt="Python"></a>
|
|
44
|
-
<a href="https://github.com/airmang/python-hwpx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-
|
|
45
|
+
<a href="https://github.com/airmang/python-hwpx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"></a>
|
|
45
46
|
<a href="https://airmang.github.io/python-hwpx/"><img src="https://img.shields.io/badge/docs-Sphinx-8CA1AF" alt="Docs"></a>
|
|
46
47
|
</p>
|
|
47
48
|
</p>
|
|
48
49
|
|
|
49
50
|
---
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
한/글 설치 없이, OS에 관계없이 HWPX 문서의 구조를 파싱하고 콘텐츠를 조작할 수 있습니다.
|
|
53
|
-
문서 편집 API뿐 아니라 스키마/패키지 검증, unpack/pack, 템플릿 분석 같은 XML-first 워크플로도 함께 제공합니다.
|
|
52
|
+
## 🧩 HWPX Stack (3종)
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
> | **크로스 플랫폼** | ✅ Linux / macOS / Windows / CI | ❌ Windows 전용 | ✅ |
|
|
61
|
-
> | **방식** | 직접 XML 파싱 | COM 자동화 | OLE 파싱 |
|
|
54
|
+
| 계층 | 레포 | 역할 |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| 📦 라이브러리 | **[`python-hwpx`](https://github.com/airmang/python-hwpx)** | 순수 파이썬 HWPX 파싱·편집·생성 코어 |
|
|
57
|
+
| 🔌 MCP 서버 | [`hwpx-mcp-server`](https://github.com/airmang/hwpx-mcp-server) | MCP 클라이언트(Claude Desktop, VS Code 등)에서 HWPX 조작 |
|
|
58
|
+
| 🎯 에이전트 스킬 | [`hwpx-skill`](https://github.com/airmang/hwpx-skill) | 에이전트가 HWPX를 바로 쓰게 해주는 공식 온보딩 스킬 |
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
---
|
|
61
|
+
## 왜 python-hwpx인가
|
|
64
62
|
|
|
65
|
-
|
|
63
|
+
- 한컴오피스 설치 불필요 — 순수 파이썬으로 어디서나 동작
|
|
64
|
+
- XML-first 워크플로 — 스키마 검증·unpack/pack까지 포함
|
|
65
|
+
- 에이전트·자동화 친화 — MCP 서버·Skill이 같은 스택 위에서 직결
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|--------|------|------|------|
|
|
69
|
-
| ✅ Windows | ✅ | ✅ | 한컴오피스 |
|
|
70
|
-
| ✅ macOS | ✅ | ✅ | 한컴오피스 Mac |
|
|
71
|
-
| ✅ Linux | ✅ | ✅ | 한컴오피스 Linux |
|
|
72
|
-
| ✅ CI/CD | ✅ | ✅ | Docker, GitHub Actions 등 |
|
|
67
|
+
## 대항 라이브러리 비교
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
| 항목 | python-hwpx | pyhwp(x) 류 | ole+bin 수작업 |
|
|
70
|
+
|---|---|---|---|
|
|
71
|
+
| HWPX Open XML 지원 | ✅ | ⚠️ 부분 | ❌ |
|
|
72
|
+
| 한컴오피스 설치 불필요 | ✅ | ✅ | ✅ |
|
|
73
|
+
| 편집/생성 API | ✅ | ❌ 대부분 읽기 | ❌ |
|
|
74
|
+
| 스키마 검증 | ✅ | ❌ | ❌ |
|
|
75
|
+
| AI 에이전트 연동 (MCP) | ✅ (hwpx-mcp-server) | ❌ | ❌ |
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
## ⚡ 30초 안에 가치 확인
|
|
78
|
+
|
|
79
|
+
### 1. 기존 문서를 열고 수정
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from hwpx import HwpxDocument
|
|
83
|
+
|
|
84
|
+
document = HwpxDocument.open("보고서.hwpx")
|
|
85
|
+
document.add_paragraph("자동화로 추가한 문단입니다.")
|
|
86
|
+
document.save_to_path("보고서-수정.hwpx")
|
|
78
87
|
```
|
|
79
88
|
|
|
80
|
-
|
|
89
|
+
### 2. 양식형 표를 코드로 채우기
|
|
81
90
|
|
|
82
|
-
|
|
91
|
+
```python
|
|
92
|
+
from hwpx import HwpxDocument
|
|
93
|
+
|
|
94
|
+
doc = HwpxDocument.open("신청서.hwpx")
|
|
95
|
+
result = doc.fill_by_path({
|
|
96
|
+
"성명 > right": "홍길동",
|
|
97
|
+
"소속 > right": "플랫폼팀",
|
|
98
|
+
})
|
|
99
|
+
doc.save_to_path("신청서-작성완료.hwpx")
|
|
100
|
+
|
|
101
|
+
print(result["applied_count"], result["failed_count"])
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 3. 텍스트 추출과 구조 검증
|
|
83
105
|
|
|
84
106
|
```python
|
|
85
107
|
from hwpx import HwpxDocument
|
|
86
108
|
|
|
87
|
-
|
|
88
|
-
|
|
109
|
+
text = HwpxDocument.open("보고서.hwpx").export_markdown()
|
|
110
|
+
print(text[:500])
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
hwpx-validate-package 보고서.hwpx
|
|
115
|
+
hwpx-analyze-template 보고서.hwpx
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
처음에는 `open/new -> edit/extract -> save_to_path` 흐름만 잡으면 된다. 패키지 구조, XML 파트, 템플릿 회귀 점검은 필요할 때만 확장하면 된다.
|
|
119
|
+
|
|
120
|
+
## 어디부터 읽으면 되나
|
|
121
|
+
|
|
122
|
+
필요한 작업부터 바로 들어가면 된다.
|
|
123
|
+
|
|
124
|
+
- **첫 파일을 열고 저장하는 최소 경로** → [`docs/quickstart.md`](docs/quickstart.md)
|
|
125
|
+
- **문단, 표, 메모, 섹션 편집 패턴** → [`docs/usage.md`](docs/usage.md)
|
|
126
|
+
- **텍스트 추출, 구조 조회, 검증/패키지 작업** → [`docs/usage.md`](docs/usage.md)
|
|
127
|
+
- **실행 가능한 예제 모음** → [`docs/examples.md`](docs/examples.md)
|
|
128
|
+
- **패키지 구조와 스키마 심화** → [`docs/schema-overview.md`](docs/schema-overview.md)
|
|
129
|
+
- **설치 검증과 개발 환경 확인** → [`docs/installation.md`](docs/installation.md)
|
|
89
130
|
|
|
90
|
-
|
|
91
|
-
# doc = HwpxDocument.open("보고서.hwpx")
|
|
131
|
+
## examples 하이라이트
|
|
92
132
|
|
|
93
|
-
|
|
94
|
-
|
|
133
|
+
<table>
|
|
134
|
+
<tr>
|
|
135
|
+
<td valign="top">
|
|
136
|
+
<strong><a href="examples/build_release_checklist.py">build_release_checklist.py</a></strong><br>
|
|
137
|
+
메모와 스타일 편집이 포함된 릴리스 체크리스트용 HWPX를 생성한다.
|
|
138
|
+
</td>
|
|
139
|
+
<td valign="top">
|
|
140
|
+
<strong><a href="examples/extract_text.py">extract_text.py</a></strong><br>
|
|
141
|
+
본문과 중첩 객체 텍스트를 CLI로 빠르게 추출한다.
|
|
142
|
+
</td>
|
|
143
|
+
<td valign="top">
|
|
144
|
+
<strong><a href="examples/find_objects.py">find_objects.py</a></strong><br>
|
|
145
|
+
태그·속성 기준으로 OWPML XML 노드를 추적한다.
|
|
146
|
+
</td>
|
|
147
|
+
</tr>
|
|
148
|
+
</table>
|
|
95
149
|
|
|
96
|
-
# 표 추가 (2×3)
|
|
97
|
-
table = doc.add_table(rows=2, cols=3)
|
|
98
|
-
table.set_cell_text(0, 0, "이름")
|
|
99
|
-
table.set_cell_text(0, 1, "부서")
|
|
100
|
-
table.set_cell_text(0, 2, "연락처")
|
|
101
150
|
|
|
102
|
-
|
|
103
|
-
|
|
151
|
+
## Quick Start
|
|
152
|
+
|
|
153
|
+
새 문서를 바로 만들고 싶다면 이렇게 시작하면 된다.
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from hwpx import HwpxDocument
|
|
104
157
|
|
|
105
|
-
|
|
106
|
-
|
|
158
|
+
document = HwpxDocument.new()
|
|
159
|
+
document.add_paragraph("python-hwpx로 만든 새 문서")
|
|
160
|
+
document.save_to_path("새문서.hwpx")
|
|
107
161
|
```
|
|
108
162
|
|
|
109
163
|
> 💡 컨텍스트 매니저도 지원합니다:
|
|
@@ -113,6 +167,27 @@ doc.save_to_path("결과물.hwpx")
|
|
|
113
167
|
> doc.save_to_path("결과물.hwpx")
|
|
114
168
|
> ```
|
|
115
169
|
|
|
170
|
+
표, 메모, 텍스트 추출, 검증, 패키지/XML 심화는 [`docs/quickstart.md`](docs/quickstart.md)와 [`docs/usage.md`](docs/usage.md)에서 바로 이어진다.
|
|
171
|
+
|
|
172
|
+
> **pyhwpx / pyhwp와 다른 점?**
|
|
173
|
+
> | | python-hwpx | pyhwpx | pyhwp |
|
|
174
|
+
> |---|---|---|---|
|
|
175
|
+
> | **대상 포맷** | `.hwpx` (OWPML/OPC) | `.hwpx` | `.hwp` (v5 바이너리) |
|
|
176
|
+
> | **한/글 설치** | 불필요 | 필요 (Windows COM) | 불필요 |
|
|
177
|
+
> | **크로스 플랫폼** | ✅ Linux / macOS / Windows / CI | ❌ Windows 전용 | ✅ |
|
|
178
|
+
> | **방식** | 직접 XML 파싱 | COM 자동화 | OLE 파싱 |
|
|
179
|
+
|
|
180
|
+
## 🌍 크로스 플랫폼 지원
|
|
181
|
+
|
|
182
|
+
HWPX 파일은 **ZIP + XML** 구조이므로, 한/글 프로그램 없이 Python만으로 읽고 편집하는 워크플로를 구성할 수 있습니다.
|
|
183
|
+
|
|
184
|
+
| 플랫폼 | 읽기 | 쓰기 | 비고 |
|
|
185
|
+
|--------|------|------|------|
|
|
186
|
+
| ✅ Windows | ✅ | ✅ | 한컴오피스 |
|
|
187
|
+
| ✅ macOS | ✅ | ✅ | 한컴오피스 Mac |
|
|
188
|
+
| ✅ Linux | ✅ | ✅ | 한컴오피스 Linux |
|
|
189
|
+
| ✅ CI/CD | ✅ | ✅ | Docker, GitHub Actions 등 |
|
|
190
|
+
|
|
116
191
|
## 주요 기능 한눈에 보기
|
|
117
192
|
|
|
118
193
|
| 카테고리 | 기능 | 설명 |
|
|
@@ -191,6 +266,8 @@ for obj in ObjectFinder("문서.hwpx").find_all(tag="tbl"):
|
|
|
191
266
|
print(obj.tag, obj.path)
|
|
192
267
|
```
|
|
193
268
|
|
|
269
|
+
`hp:tab`과 `ctrl id="tab"`은 탭 문자(`\t`)로 보존됩니다. 따라서 `Paragraph.text`, `TextExtractor`, `export_text()`/`export_html()`/`export_markdown()` 경로에서 같은 탭 의미를 유지한 채 roundtrip 할 수 있습니다. 필요하면 `preserve_breaks=False`로 줄바꿈/탭을 공백 기반으로 평탄화할 수 있습니다.
|
|
270
|
+
|
|
194
271
|
### 🎨 스타일 기반 텍스트 치환
|
|
195
272
|
|
|
196
273
|
서식(색상, 밑줄, charPrIDRef)으로 런을 필터링해 선택적으로 교체합니다.
|
|
@@ -256,37 +333,6 @@ python-hwpx
|
|
|
256
333
|
└── hwpx.templates # 내장 빈 문서 템플릿
|
|
257
334
|
```
|
|
258
335
|
|
|
259
|
-
## CLI
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
# HWPX 문서 스키마 유효성 검사
|
|
263
|
-
hwpx-validate 문서.hwpx
|
|
264
|
-
|
|
265
|
-
# ZIP/OPC/HWPX 패키지 구조 검사
|
|
266
|
-
hwpx-validate-package 문서.hwpx
|
|
267
|
-
|
|
268
|
-
# HWPX 풀기 / 다시 묶기 (기본값: XML/HWPF 바이트 보존)
|
|
269
|
-
hwpx-unpack 문서.hwpx ./unpacked
|
|
270
|
-
hwpx-unpack 문서.hwpx ./pretty-unpacked --pretty-xml
|
|
271
|
-
hwpx-pack ./unpacked ./repacked.hwpx
|
|
272
|
-
|
|
273
|
-
# 레퍼런스 문서 분석과 작업 디렉터리 추출
|
|
274
|
-
hwpx-analyze-template 문서.hwpx --extract-dir ./template-parts --json
|
|
275
|
-
hwpx-pack ./template-parts ./template-roundtrip.hwpx
|
|
276
|
-
hwpx-validate-package ./template-roundtrip.hwpx
|
|
277
|
-
|
|
278
|
-
# plain / markdown 텍스트 추출
|
|
279
|
-
hwpx-text-extract 문서.hwpx --format markdown --output 문서.md
|
|
280
|
-
|
|
281
|
-
# 문서 구조 변화 징후 비교
|
|
282
|
-
hwpx-page-guard --reference 원본.hwpx --output 결과.hwpx
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
`hwpx-page-guard`는 렌더된 실제 쪽수를 계산하지 않습니다. 대신 단락 수, 표 수, shape/control 수, 명시적 page/column break, 텍스트 길이 같은 구조 지표를 비교해 편집 전후 변화 징후를 빠르게 점검합니다.
|
|
286
|
-
|
|
287
|
-
`hwpx-validate-package`는 `Contents/content.hpf` 같은 고정 경로를 전제로 두지 않고, `META-INF/container.xml`과 실제 rootfile/manifest 선언을 따라가며 패키지 구조를 확인합니다. 엔진이 열 수 있는 비표준 패키지는 가능한 경우 경고로 분리해 보여줍니다.
|
|
288
|
-
|
|
289
|
-
`hwpx-analyze-template --extract-dir`는 다시 묶고 점검하기 쉬운 작업 디렉터리를 만듭니다. 재구성과 구조 검증에 필요한 파일을 함께 꺼내는 용도이며, 편집기에서의 최종 렌더링 결과까지 보장한다는 뜻은 아닙니다.
|
|
290
336
|
|
|
291
337
|
## 문서
|
|
292
338
|
|
|
@@ -297,6 +343,7 @@ hwpx-page-guard --reference 원본.hwpx --output 결과.hwpx
|
|
|
297
343
|
| **[📚 사용 가이드](https://airmang.github.io/python-hwpx/usage.html)** | 50+ 실전 사용 패턴 |
|
|
298
344
|
| **[🔧 API 레퍼런스](https://airmang.github.io/python-hwpx/api_reference.html)** | 클래스·메서드 상세 명세 |
|
|
299
345
|
| **[📐 스키마 개요](https://airmang.github.io/python-hwpx/schema-overview.html)** | OWPML 스키마 구조 설명 |
|
|
346
|
+
| **[🧪 스택 통합 자료](shared/hwpx/README.md)** | fixture, smoke, validation, compatibility 운영 자료 |
|
|
300
347
|
|
|
301
348
|
## 지원 포맷
|
|
302
349
|
|
|
@@ -331,11 +378,10 @@ pip install -e ".[dev]"
|
|
|
331
378
|
pytest
|
|
332
379
|
```
|
|
333
380
|
|
|
334
|
-
|
|
381
|
+
머지된 기여자 목록은 [CONTRIBUTORS.md](CONTRIBUTORS.md)에서 확인할 수 있습니다.
|
|
335
382
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
Commercial use requires separate permission from the copyright holders.
|
|
383
|
+
## License
|
|
384
|
+
Apache License 2.0. See LICENSE and NOTICE.
|
|
339
385
|
|
|
340
386
|
<br>
|
|
341
387
|
|