Skip to main content
# zh-doclint

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)。

Download files

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

Source Distribution

zh_doclint-0.1.2.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

zh_doclint-0.1.2-py2.py3-none-any.whl (18.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file zh_doclint-0.1.2.tar.gz.

File metadata

  • Download URL: zh_doclint-0.1.2.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zh_doclint-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aed3f924b18e80853720675b2dfc4066425d185279b8d47bc8506c931dba5611
MD5 8de280ccb1154e4779f153f9cbf41e30
BLAKE2b-256 b36c61ad2192487471554ef0a886d3932e8c0bb792f4b3465b65dd4d7063f7e4

See more details on using hashes here.

File details

Details for the file zh_doclint-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for zh_doclint-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e295df143f2ff8c52eac39a7643fc4bb573c4b9d8fc78668da22cf67e7067e96
MD5 95a1e16ee0d7c9832d0b1d5e6455a4a3
BLAKE2b-256 536de5fe0274f1cf93459e5b7b8a8efa00cd952fd3b9fc827ee8dbc1a5ff35c5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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