pyhwp2md
Convert HWP (Hangul Word Processor) and HWPX files to Markdown format.
Features
- 🔄 Convert both HWP (binary) and HWPX (XML) files
- 📝 Extracts text, paragraphs, and tables
- 📊 Converts tables to Markdown pipe format
- 🎯 Simple CLI interface
- 🐍 Python 3.10+ support
Quick Start
Run without installation (uvx)
# Convert directly without installing
uvx pyhwp2md document.hwp
# Save to file
uvx pyhwp2md document.hwp -s
# Specify output path
uvx pyhwp2md document.hwpx -o output.md
Installation
Using pip
pip install pyhwp2md
Using uv
uv pip install pyhwp2md
From source
git clone https://github.com/pitzcarraldo/pyhwp2md.git
cd pyhwp2md
pip install -e .
Usage
Command Line
# Output to stdout (default)
pyhwp2md document.hwp
# Save to .md file in same directory
pyhwp2md document.hwp -s
pyhwp2md document.hwpx --save
# Specify output path
pyhwp2md document.hwp -o output.md
Python API
from pyhwp2md import convert
# Convert and get markdown string
markdown = convert("document.hwp")
print(markdown)
# Convert and save to file
markdown = convert("document.hwpx", output_path="output.md")
Supported Formats
| Format | Extension | Description |
|---|---|---|
| HWP | .hwp |
Binary format (HWP 5.0+) |
| HWPX | .hwpx |
XML-based format |
Supported Elements
- ✅ Paragraphs
- ✅ Headings (H1-H6)
- ✅ Tables
- ✅ Lists (bulleted/numbered)
- ✅ Line breaks
- ⚠️ Images (coming soon)
- ⚠️ Links (partial support)
Development
Setup
# Clone repository
git clone https://github.com/pitzcarraldo/pyhwp2md.git
cd pyhwp2md
# Install with dev dependencies
pip install -e .[dev]
Running Tests
# Run tests
pytest
# Run tests with coverage
pytest --cov=pyhwp2md
# Run linter
ruff check src/ tests/
# Run type checker
mypy src/
Dependencies
- pyhwp - HWP binary file parser
- python-hwpx - HWPX XML file parser
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Acknowledgments
- pyhwp by mete0r
- python-hwpx by airmang
Links
Metadata
Release files for pyhwp2md 0.1.3
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 |
|---|---|---|---|---|
| pyhwp2md-0.1.3.tar.gz | 10.8 kB | Without provenance | Details for pyhwp2md-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyhwp2md-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pyhwp2md-0.1.3-py3-none-any.whl |
Total release size: 24.3 kB
Release files / pyhwp2md-0.1.3.tar.gz
| Download URL | pyhwp2md-0.1.3.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26ebe5948635f26dfd08932dcd79501cc739ea2a755eb7f903925a0ec08ad7bf
|
|
BLAKE2b-256 checksum How to use checksums |
eef163508720a4eb3efcc7e5816ea1c26e9273d53f60b8cf5ff9180e2c7dfb1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pyhwp2md-0.1.3-py3-none-any.whl
| Download URL | pyhwp2md-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05dcc9c575430ec79a232dd3d9470e821a828af5d27a3a0aab875ae661c218d7
|
|
BLAKE2b-256 checksum How to use checksums |
df02a527567e8a982d8cb24e47b7e365fc16a1ab3a325651d75411f48b5c5ec8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for pyhwp2md 0.1.3
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.