Scan a word document for phrases.
Project description
📄 checkdoc
checkdoc is a lightweight Python utility for scanning .docx Word documents for specified key phrases. It can be used as a command-line tool or imported as a module in larger projects.
🔍 Features
- Search for multiple key phrases in
.docxfiles - Scans both paragraphs and tables
- Case-insensitive matching
- Simple CLI interface
📦 Installation
The recommended usage is with uv:
uvx checkdoc
You can install the required dependencies using pip:
pip install python-docx
or uv:
uv add checkdoc
🚀 Usage
Command Line
uvx checkdoc path/to/document.docx phrase1 phrase2 ...
Example:
uvx test.docx "foo" "bar"
As a Module
from checkdoc import find_phrases_in_docx
matches = find_phrases_in_docx("test.docx", ["foo", "bar"])
for line in matches:
print(line)
🧠 How It Works
- Loads the
.docxfile usingpython-docx - Scans all paragraphs and table cells
- Matches any text containing the specified phrases (case-insensitive)
- Returns a list of matching text snippets
🛠 Requirements
- Python 3.13+
python-docx
📃 License
GNU GPLv3 License. See LICENSE file for details.
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 Distribution
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 checkdoc-0.1.0.tar.gz.
File metadata
- Download URL: checkdoc-0.1.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bed0f6d057c751830149038fc877e56f23444e97a45e7425619e9b5ea208439
|
|
| MD5 |
1b65af9ed0b052db24002be6caf56527
|
|
| BLAKE2b-256 |
fb724eb5c87b9242365f9ae2b3e03e84c53ec0875b9a9b92af96f9a0be4e5b95
|
File details
Details for the file checkdoc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: checkdoc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad10cb1fcd567d96bfe49d550c41e8b6b55533e471960450d521a06ab492435e
|
|
| MD5 |
03e46e62ddda830d9b114b76fdb2deb3
|
|
| BLAKE2b-256 |
2eb2518ccce4abd2089f04d98978e9479f3a44f7900e84d595d448c5c50e1241
|