dochooks
Some pre-commit hooks for docs.
Usage
.pre-commit-config.yaml
repos:
- repo: https://github.com/PFCCLab/dochooks
rev: v0.6.0
hooks:
- id: check-whitespace-between-cn-and-en-char
files: \.md$|\.rst$
- id: insert-whitespace-between-cn-and-en-char
files: \.md$|\.rst$
- id: check-case-conflict
Hooks
check-whitespace-between-cn-and-en-char
用于检查中英文之间是否有空格
insert-whitespace-between-cn-and-en-char
用于自动在中英文之间添加空格
check-case-conflict
用于检测在大小写不敏感文件系统(如 APFS、NTFS)上可能冲突的文件名例如仓库中已有 file.txt,新建 File.txt 时会发现冲突。
自定义错误信息:
- id: check-case-conflict
args: ['--error-message="错误:检测到大小写冲突!\n{conflicts}"']
Pragma
dochooks 支持 dochooks: skip-next-line 和 dochooks: skip-line 两种 pragma
<!-- dochooks: skip-next-line -->
这是一段中文and English混合的text
这是一段中文and English混合的text <!-- dochooks: skip-line -->
Metadata
Release files for dochooks 0.6.0
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 |
|---|---|---|---|---|
| dochooks-0.6.0.tar.gz | 5.6 kB | With provenance | Details for dochooks-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dochooks-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for dochooks-0.6.0-py3-none-any.whl |
Total release size: 15.2 kB
Release files / dochooks-0.6.0.tar.gz
| Download URL | dochooks-0.6.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28b093e08dccad16288b13cfc73897341973116f0417f231c1760461df171cb7
|
|
BLAKE2b-256 checksum How to use checksums |
c899170a69d9f6a36f17c64bf7a549d59ca9e51fedd3eda7d67a71f2ec68a969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 30, 2025.
Transparency logRelease files / dochooks-0.6.0-py3-none-any.whl
| Download URL | dochooks-0.6.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65da3ed7f64ff7b8e5bbbb836118794b63b461cd8b6638e4a7ac8cc3858ae69a
|
|
BLAKE2b-256 checksum How to use checksums |
b17a1d85c65d867141004001b3d7bb2d025201e2a306860503caec10bc7ad7ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 30, 2025.
Transparency logSecurity for dochooks 0.6.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dochooks-0.6.0.tar.gz
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 Sep 30, 2025.
Transparency logA 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.