Note: This project is highly related to Chinese, so the document is writtern in Chinese.
## 简介
一个检查文档风格的工具。
## 安装
```
pip install zh-doclint
```
## 使用
```shell
$ zh-doclint --help
Usage: zh-doclint [OPTIONS] FPATH
Options:
--version Show the version and exit.
--help Show this message and exit.
$ ccat doc.md
我跟你讲,这里有问题. 这个
case一看就是“药丸”
$ zh-doclint doc.md
==========================================
E101: 英文与非标点的中文之间需要有一个空格
==========================================
LINE: 2
case一看就是“
--
...............
==================================================
E201: 只有中文或中英文混排中,一律使用中文全角标点
==================================================
LINE: 1
里有问题.
-
.........
==========================================================
E204: 中文文案中使用中文引号「」和『』,其中「」为外层引号
==========================================================
LINE: 2
一看就是“药丸
-
..............
LINE: 2
是“药丸”
-
..........
```
## 支持的检查项目
| 错误码 | 检查范围 | 描述 |
| ---- | -------- | ------------------------------------------------------------------------------ |
| E101 | 段落 | 英文与非标点的中文之间需要有一个空格 |
| E102 | 段落 | 数字与非标点的中文之间需要有一个空格 |
| E103 | 段落 | 除了「%」、「℃」、以及倍数单位(如 2x、3n)之外,其余数字与单位之间需要加空格 |
| E104 | 段落 | 书写时括号中全为数字,则括号用半角括号且首括号前要空一格 |
| E201 | 句子 | 只有中文或中英文混排中,一律使用中文全角标点 |
| E202 | 句子 | 如果出现整句英文,则在这句英文中使用英文、半角标点 |
| E203 | 段落 | 中文标点与其他字符间一律不加空格 |
| E204 | 句子 | 中文文案中使用中文引号「」和『』,其中「」为外层引号 |
| E205 | 段落 | 省略号请使用「……」标准用法 |
| E206 | 段落 | 感叹号请使用「!」标准用法 |
| E207 | 段落 | 请勿在文章内使用「~」 |
| E301 | 段落 | 常用名词错误 |
详情见 [写作规范和格式规范,DaoCloud 文档](http://docs-static.daocloud.io/write-docs/format)。
Metadata
Release files for zh_doclint 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 | Provenance | Actions |
|---|---|---|---|---|
| zh_doclint-0.1.2.tar.gz | 14.9 kB | Without provenance | Details for zh_doclint-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zh_doclint-0.1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for zh_doclint-0.1.2-py2.py3-none-any.whl |
Total release size: 33.3 kB
Release files / zh_doclint-0.1.2.tar.gz
| Download URL | zh_doclint-0.1.2.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aed3f924b18e80853720675b2dfc4066425d185279b8d47bc8506c931dba5611
|
|
BLAKE2b-256 checksum How to use checksums |
b36c61ad2192487471554ef0a886d3932e8c0bb792f4b3465b65dd4d7063f7e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / zh_doclint-0.1.2-py2.py3-none-any.whl
| Download URL | zh_doclint-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e295df143f2ff8c52eac39a7643fc4bb573c4b9d8fc78668da22cf67e7067e96
|
|
BLAKE2b-256 checksum How to use checksums |
536de5fe0274f1cf93459e5b7b8a8efa00cd952fd3b9fc827ee8dbc1a5ff35c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for zh_doclint 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.