unword
Convert legacy Microsoft Word .doc files (OLE/CFB format) to Markdown. Inspired by antiword.
Extracts body text with heading levels, page breaks, and textbox contents. No external dependencies (no LibreOffice, no COM).
Installation
CLI (Rust)
cargo install unword
Python
pip install unword
From source
Requires maturin and a virtual environment:
uv venv .venv && source .venv/bin/activate
maturin develop
Or build a wheel:
maturin build --release
pip install target/wheels/unword-*.whl
Usage
CLI
# Print to stdout
unword -i document.doc
# Write to file
unword -i document.doc -o output.md
Python
import unword
doc = unword.parse_doc(open("document.doc", "rb").read())
print(doc.body_text) # Markdown string with headings
print(doc.textboxes) # List of textbox strings
Rust library
let data = std::fs::read("document.doc")?;
let doc = unword::parse_doc(&data)?;
println!("{}", doc.body_text);
Output format
- Headings are rendered as
#,##,###, etc. based on Word styles - Paragraphs are separated by blank lines
- Page breaks become
--- - Textboxes are extracted separately
Tests
# Rust
cargo test
# Python
pytest tests/test_python.py
License
MIT
Alternative
- antiword
- abiword
- tika
- libreoffice
Metadata
Release files for unword 0.2.2
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 |
|---|---|---|---|---|
| unword-0.2.2.tar.gz | 18.9 kB | Without provenance | Details for unword-0.2.2.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| unword-0.2.2-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for unword-0.2.2-cp38-abi3-win_amd64.whl |
| unword-0.2.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for unword-0.2.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| unword-0.2.2-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for unword-0.2.2-cp38-abi3-macosx_11_0_arm64.whl |
| unword-0.2.2-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for unword-0.2.2-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 1.8 MB
Release files / unword-0.2.2.tar.gz
| Download URL | unword-0.2.2.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
738a8a929ac27319347078ca13f4db5d474570ec943e567e5164a0a4cac2fe9c
|
|
BLAKE2b-256 checksum How to use checksums |
4a8b52d6898d8d314becc76ad0153c84acb2682f238ad381e0ad582c5ec56df3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / unword-0.2.2-cp38-abi3-win_amd64.whl
| Download URL | unword-0.2.2-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 354.0 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b180e1356b3d95f183702befd0534cd924775ec7d55d9002623242ba7f0ed7df
|
|
BLAKE2b-256 checksum How to use checksums |
7f60e24955624b272256febc45b030c0fbc9e5f2eeaf0977c1ebaedff1532080
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / unword-0.2.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | unword-0.2.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 496.0 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fd671553a52f5d9986fd334d714fa4466c9394dc6d5ee0ac4b6c72e45df214c6
|
|
BLAKE2b-256 checksum How to use checksums |
0348b061e1bb43d3ccfcb04f746e90ebb9fa70e3df31f901e3fd21a9858ff6c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / unword-0.2.2-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | unword-0.2.2-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 462.0 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
676fab7ea39bfc2029917f1b9e60336d80590d91412321437b3b640192730e64
|
|
BLAKE2b-256 checksum How to use checksums |
281f4cec6adfc0846a3b88c61cded8080bdc15db816f2fed26c3ab6da395b1c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / unword-0.2.2-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | unword-0.2.2-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 462.3 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
212ac214ea02f49866ba7bb68bf26f05435252d4c6ba18dd1e5fca879a74941d
|
|
BLAKE2b-256 checksum How to use checksums |
8a414a36ca6eaa219ac2d275d7794325b2669272e1d2f79c9a13732fd9ff1eba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for unword 0.2.2
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.