简体中文 | 英文版
ChatWord
ChatWord 为 ChatArch 提供 Word/PDF 文档检查、纯文本抽取与自动化接口。
快速开始
pip install -e ".[dev,word,pdf]"
chatword --tree
chatword --tree-brief
chatword inspect ./example.docx
chatword extract ./example.pdf -o ./example.txt
python -m pytest -q
python -m build
Word/PDF 依赖
基础安装只包含 CLI 运行时;文档解析依赖按任务拆成 optional extras:
pip install "ChatWord[word]" # python-docx, mammoth
pip install "ChatWord[pdf]" # pypdf, pdfplumber
pip install "ChatWord[ocr]" # pdf2image, pytesseract;还需要系统 OCR 工具
pip install "ChatWord[all]" # 常见 Word/PDF/OCR 栈
任务导向 CLI
chatword inspect FILE [--json]:识别文档类型、大小、解析器可用性和轻量元数据。chatword extract FILE [-o OUTPUT] [--force]:从.docx或.pdf抽取纯文本;默认拒绝覆盖已有输出,且始终拒绝覆盖输入文档。- 完整命令面见 CLI 树,设计与 Python API 映射见 CLI 设计。
CLI 规范
这个包依赖 chatstyle>=0.2.0,<0.3.0。当前没有 env/profile/config 行为,因此不声明 ChatEnv provider 或运行时依赖。CLI 使用:
CommandSchema/CommandField描述输入。add_interactive_option()提供统一-i/-I。resolve_command_inputs()统一缺参补问、默认值、TTY 与校验。add_tree_option()从真实 Click 注册表提供--tree与--tree-brief。
目录结构
src/:包源码tests/:CLI、parser、错误契约和输出安全测试docs/:按.en.md镜像维护的中英文 MkDocs 文档
开发说明
扩展脚手架前,先阅读 DEVELOP.md 和 AGENTS.md。
Metadata
Release files for ChatWord 0.1.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 | |
|---|---|---|---|
| chatword-0.1.2.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chatword-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / chatword-0.1.2.tar.gz
| Download URL | chatword-0.1.2.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b5536b253a041cc54a8d09b8c74c9b3078f82cc2dc7802b46274b4bfc3440ea
|
|
BLAKE2b-256 checksum How to use checksums |
0e279b083acc3e84d85458224d03318684e75bfb6ceb3720e2887b995f229887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency logRelease files / chatword-0.1.2-py3-none-any.whl
| Download URL | chatword-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38aa362e74345dadf326056d7c1268512372b95c0f76149b90680805798d1cf4
|
|
BLAKE2b-256 checksum How to use checksums |
fbf9fc498ba5c1a856765ec63bba3ed7f54a01f29a18766f1ec82753385302bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency log