Parse all contents of a docx file with python-docx
Installation
python3 -m pip install docx-parser
Features:
paragraph: text paragraph, with style_idmultipart: paragraph with image or hyperlinktable: table data with merged_cells
Examples
- CMD
docx_parser --help
# parse image as file
docx_parser tests/demo.docx -D tests/media -o tests/out.file.jl
# parse image as base64 string
docx_parser tests/demo.docx -A base64 -o tests/out.base64.jl
- Python
from docx_parser import DocumentParser
infile = 'tests/demo.docx'
doc = DocumentParser(infile)
for _type, item in doc.parse():
print(_type, item)
ToDo
- parse text style: color, bgcolor, font, bold, italic ...
- parse paragraph format
Metadata
Release files for docx-parser 1.0.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 | |
|---|---|---|---|
| docx_parser-1.0.3.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docx_parser-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / docx_parser-1.0.3.tar.gz
| Download URL | docx_parser-1.0.3.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e56648fa8fff5be35be20b7752bcf783d9f7698c187172f0a3dd1fa880d8ad8a
|
|
BLAKE2b-256 checksum How to use checksums |
7773e541c94b31321d103d231068fb550930e70a07e500449233462c403373ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / docx_parser-1.0.3-py3-none-any.whl
| Download URL | docx_parser-1.0.3-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b64d4aa7b3d649036118f6843fbc4f946a687cd6df083d0f7348c5448e81a956
|
|
BLAKE2b-256 checksum How to use checksums |
326bb342d3ae152b9ddc7d52e314dca4534656293f1bc8d56758b51c10d3a0f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|