Skip to main content

No project description provided

Project description

dochooks

Some pre-commit hooks for docs.

PyPI - Python Version pypi PyPI - Downloads LICENSE
uv ruff Gitmoji

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-linedochooks: skip-line 两种 pragma

<!-- dochooks: skip-next-line -->
这是一段中文and English混合的text
这是一段中文and English混合的text  <!-- dochooks: skip-line -->

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dochooks-0.6.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dochooks-0.6.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file dochooks-0.6.0.tar.gz.

File metadata

  • Download URL: dochooks-0.6.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dochooks-0.6.0.tar.gz
Algorithm Hash digest
SHA256 28b093e08dccad16288b13cfc73897341973116f0417f231c1760461df171cb7
MD5 3860eb942c137b549c64b5ad6e994435
BLAKE2b-256 c899170a69d9f6a36f17c64bf7a549d59ca9e51fedd3eda7d67a71f2ec68a969

See more details on using hashes here.

Provenance

The following attestation bundles were made for dochooks-0.6.0.tar.gz:

Publisher: release.yml on PFCCLab/dochooks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dochooks-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: dochooks-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dochooks-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65da3ed7f64ff7b8e5bbbb836118794b63b461cd8b6638e4a7ac8cc3858ae69a
MD5 f58ea6d85aa9c3c43d9b57f44991916d
BLAKE2b-256 b17a1d85c65d867141004001b3d7bb2d025201e2a306860503caec10bc7ad7ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for dochooks-0.6.0-py3-none-any.whl:

Publisher: release.yml on PFCCLab/dochooks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page