Skip to content

e2yo/eyo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Восстановление буквы «ё» в русских текстах

NPM version NPM downloads Build Status Build Status Coverage Status install size

eyo

Особенности

  • проверка и восстановление буквы «ё» в русских текстах, вместо написанной «е»;
  • замена «е» на «ё» только в бесспорных случаях;
  • исправление в словах нескольких букв «е», «ё»;
  • корректная обработка сокращений («мед. училище», но не «мёд. училище»);
  • аббревиатуры не обрабатываются.

eyo

Установка

npm install eyo -g

Командная строка

Usage: eyo [options] <file-or-url...>
    Restoring the letter «ё» (yo) in russian texts.

Options:
    -h, --help                  Output usage information
    -V, --version               Output the version number
    -l, --lint                  Search of safe and unsafe replacements
    -i, --in-place              Write files in place.
    -s, --sort                  Sort results
        --only-safe             Output only safe replacements
        --stdin                 Process text provided on <STDIN>
        --stdin-filename <file> Specify filename to process STDIN as
        --no-colors             Clean output without colors

Примеры использования

eyo file.txt > file.out.txt — безопасная замена «е» на «ё».
eyo https://example.com/index.html > file.out.html — безопасная замена «е» на «ё» на странице сайта.

eyo -i README.md — файл README.md будет перезаписан с безопасной заменой «е» на «ё».
eyo -i "**/*.md" — файлы с расширением .md будут перезаписаны с безопасной заменой «е» на «ё».
find . -name "*.md" | xargs eyo --lint
eyo --lint file1.txt file2.txt — вывод слов для файлов, где необходима или возможна замена.
eyo --lint http://habrahabr.ru — вывод слов для страницы сайта, где необходима или возможна замена.

cat file1.txt file2.txt file3.txt | eyo --stdin > output.txt
cat file1.txt | eyo --stdin --stdin-filename file1.txt

Node.js

Используйте отдельный пакет eyo-kernel без зависимостей.

npm install eyo-kernel

Ссылки

Лицензия

MIT License