Corrector: TinyCorrect v0.1-rc3 - [autocorrect]
It is in the early development stage, so, don't trust it too much, recheck and then commit.
The functions are unstable and the interfaces may change very frequently, and no data guarantee currently.
It is originally written for the RISC-V Linux project.
Currently, it provides such functions:
gitcheck
tounix
filename
spaces
newline
quotes
comments
header
revisor
toc
codeblock
codeinline
tables
images
urls
refs
typeset
words
It is modularized and more functions will be added based on user's requirement.
$ git clone https://gitee.com/tinylab/tinycorrect
// Fast configuration
$ cd tinycorrect && source tinycorrect.sh
We have introduced the background, design and usage of this project in this video, enjoy~
Basic usage:
$ tico file.md
Disable some modules:
$ gitcheck=0 toc=0 tico file.md
Skip multiple modules:
$ skip='gitcheck toc' tico file.md
Run specified modules:
$ modules="tounix toc" tico file.md
Skip fixed titles check:
$ titles="" tico file.md
Specify our own default titles:
$ titles="Usage" tico file.md
For generic articles:
$ template=generic tico file.md
Configure typeset and words engine:
// default: typeset="pangu autocorrect" words=""
$ typeset="pangu autocorrect" words="pycorrector xmnlp" tico file.md
// If one of them not work as expected, disable it
$ typeset="autocorrect" words="xmnlp" tico file.md
// lang for pycorrector: 0: Chinese, 1: English, 2: Both
$ words="pycorrector" lang=1 tico file.md
Set tab width (must with cols=1, cols is disabled by default):
$ tabs=4 cols=1 tico file.md
Download the pictures from remote sites automatically:
$ download=1 tico file.md
Disable mermaid if already converted, enabled by default to do auto upgrade:
$ mermaid=0 tico file.md
Disable the time cost URL connectivity detection:
$ url_timeout=0 tico file.md
Disable URL filters (by default, will not check the DNS like github.com):
$ url_filter=0 tico file.md
Continue run all of the modules even if one of them fails:
$ failcontinue=1 tico file.md
$ failstop=0 tico file.md
// gitcheck can not be ignored except use 'skip=gitcheck' explicitly
$ skip=gitcheck failcontinue=1 tico file.md
Configure revisor directly:
// use value from 'argument' variable
$ module=revisor argument='Revisor Name <Email Address>' tico file.md
// choose one in the default list: configs/.author/default.md
$ module=revisor tico file.md
// choose one in the your own list, list with '-'
$ touch configs/.authors/myauthors.md
$ module=revisor authors=myauthors tico file.md
Configure action after correction:
// ask
$ correctaction=ask tico file.md
// stop or quit
$ correctaction=quit tico file.md
// commit
$ correctaction=commit tico file.md
// next or continue
$ correctaction=next tico file.md
Direct commit after correction, this will override correctaction setting:
$ commit=1 tico file.md
Generate references section automatically:
$ modules=refs tico file.md
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。