npm install typograf-cli -g
typograf
.
typograf -l ru my_file.txt
.
typograf -l ru --lint my_file.txt
.
typograf -l ru,en-US my_file.txt
, .
typograf -l en-US my_file.txt
.
typograf -l ru --html-entity-type name my_file.txt
, HTML- ( 
, »
, ).
typograf -l ru --html-entity-type name --html-entity-only-invisible my_file.txt
, HTML- .
typograf -l ru -d "ru/punctuation/quote,common/nbsp/dpi" -e "ru/optalign/*" my_file.txt > new_my_file
.
typograf -l ru -c typograf.config.json my_file.txt
.
typograf --init-config
.typograf.config.json
.
typograf -l ru --only-json-keys "title,name,description" my_file.json
JSON- .
typograf -l ru --ignore-json-keys "code,date" my_file.json
JSON- .
cat my_file.txt | typograf --stdin
cat my_file.txt | typograf --stdin --stdin-filename=my_file.txt
--init-config
.typograf.json
:
{
"locale": ["ru", "en-US"],
"disableRule": [],
"enableRule": [],
"onlyJsonKeys": [],
"ignoreJsonKeys": [],
"htmlEntity": {
"type": "default",
"onlyInvisible": false
}
}
, .
:
{
"locale": ["ru", "en-US"],
"disableRule": ["common/nbsp/*"],
"enableRule": [],
"onlyJsonKeys": [],
"ignoreJsonKeys": ["comment", "phone"],
"htmlEntity": {
"type": "default",
"onlyInvisible": false
}
}
MIT License