Tekorrect
漢學家稱這個空白字元為「盤古之白」,因為它劈開了全形字和半形字之間的混沌。另有研究顯示,打字的時候不喜歡在中文和英文之間加空格的人,感情路都走得很辛苦,有七成的比例會在 34 歲的時候跟自己不愛的人結婚,而其餘三成的人最後只能把遺產留給自己的貓。畢竟愛情跟書寫都需要適時地留白。
如果真正在意 typography,那麼漢字與西文之間應該插入一個半角空格。Adobe InDesign、Microsoft Word 等對中文與西文混合排版支持較好的軟件,都默認增大漢字和西文的間距。
漢學家稱這個空白字元爲「盤古之白」,因爲它劈開了全形字和半形字之間的混沌,增加了文字的 readability。
此 Python 腳本用於給已經完成的 Markdown 遍寫的文檔進行優化,它會將壹些非標準,或不推薦的排版方式,進行自動格式化、標準化。
使用 vinta/pangu.py 爲基礎製作。
用法
使用 pip 安裝,例如: pip3 install tekorrect。
後對包含 Markdown 文件的文件夾使用以下指令:
tekorrect -p /path/to/hexo/source/_posts
若是針對單獨的文件,可使用以下指令
tekorrect -f /path/to/hexo/source/_posts/1.md
目前版本功能尚未完善,文章標題部分也會被自動添加空格(如不希望使用此功能請對本倉庫進行 Star 並等待後續更新)。
此程序就地對文件進行修改,強烈建議在進行前對原始文件進行備份!
TO-DO
- 跳過文章 title 優化
- 修复 Markdown 格式标记不当优化问题(例如:加粗的
**和删除符号~~) - 自动处理 gitHUB, Http 之类的拼写问题
Authors
Metadata
Release files for tekorrect 0.0.3
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 |
|---|---|---|---|---|
| tekorrect-0.0.3.tar.gz | 3.6 kB | Without provenance | Details for tekorrect-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tekorrect-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for tekorrect-0.0.3-py3-none-any.whl |
Total release size: 13.4 kB
Release files / tekorrect-0.0.3.tar.gz
| Download URL | tekorrect-0.0.3.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1b5edfb5d35dab67f7f844b6097755f2293aa735e5292fee9d5d6558ab0ea2f
|
|
BLAKE2b-256 checksum How to use checksums |
4c1a86e30b0d2544f62c8a2de7a834ee4ab7a3c3e50da3ec5982ec147872eec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5
|
Release files / tekorrect-0.0.3-py3-none-any.whl
| Download URL | tekorrect-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1abbe642d5a511dd7aa5aaf40b474c6f3765b8dcb9caca789f48213d144b1ea
|
|
BLAKE2b-256 checksum How to use checksums |
47f9eba6b9b835966fd1a8f17339d3738b2eae3bae4d4d6253b4b6d80eb9547f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5
|
Security for tekorrect 0.0.3
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.