简体中文 | 英文版
ChatWord
ChatWord 为 ChatArch 提供 Word/PDF 文档检查、纯文本抽取与自动化接口。
快速开始
pip install -e ".[dev,word,pdf]"
chatword --tree
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.1.1,<0.2.0 和 chatenv>=0.2.3,<0.3.0,新的命令应优先使用:
CommandSchema/CommandField描述输入。add_interactive_option()提供统一-i/-I。resolve_command_inputs()统一缺参补问、默认值、TTY 与校验。
目录结构
src/:包源码tests/:CLI、parser、错误契约和输出安全测试docs/:按.en.md镜像维护的中英文 MkDocs 文档
开发说明
扩展脚手架前,先阅读 DEVELOP.md 和 AGENTS.md。
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 chatword-0.1.1.tar.gz.
File metadata
- Download URL: chatword-0.1.1.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5946659dd7ff75c21789e7ba6beb10900410fd6cc909282b7c12411984c4447
|
|
| MD5 |
bd9ee43902a4604594fee2fe32ce52f5
|
|
| BLAKE2b-256 |
458733d6ca2d7243ec788b7a9415697bb4950c0bb8a7e4a21356afd551966e09
|
Provenance
The following attestation bundles were made for chatword-0.1.1.tar.gz:
Publisher:
publish.yml on ChatArch/ChatWord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatword-0.1.1.tar.gz -
Subject digest:
c5946659dd7ff75c21789e7ba6beb10900410fd6cc909282b7c12411984c4447 - Sigstore transparency entry: 2422414816
- Sigstore integration time:
-
Permalink:
ChatArch/ChatWord@8355a08a7f9441dd5846cfd7d7ae5640f8cb06b3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ChatArch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8355a08a7f9441dd5846cfd7d7ae5640f8cb06b3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file chatword-0.1.1-py3-none-any.whl.
File metadata
- Download URL: chatword-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cec3058d10460e0b1ce50dbc20597275b5cb8d035a17d86a7c1347e17676062
|
|
| MD5 |
70cf6452dd2a85add9e05d8f787a58d5
|
|
| BLAKE2b-256 |
46aca3f97a38f5c0ac62259ff86298b85d7d43431b5a2933d2669bd10f4d8d54
|
Provenance
The following attestation bundles were made for chatword-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ChatArch/ChatWord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatword-0.1.1-py3-none-any.whl -
Subject digest:
1cec3058d10460e0b1ce50dbc20597275b5cb8d035a17d86a7c1347e17676062 - Sigstore transparency entry: 2422414908
- Sigstore integration time:
-
Permalink:
ChatArch/ChatWord@8355a08a7f9441dd5846cfd7d7ae5640f8cb06b3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ChatArch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8355a08a7f9441dd5846cfd7d7ae5640f8cb06b3 -
Trigger Event:
push
-
Statement type: