Skip to content

Commit

Permalink
Update help and README
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 13, 2017
1 parent 8cf1163 commit 12b407b
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,88 @@
[![Build Status](https://travis-ci.org/VodkaBears/yaspell.svg?branch=master)](https://travis-ci.org/VodkaBears/yaspell)
[![Go Report Card](https://goreportcard.com/badge/github.com/vodkabears/yaspell)](https://goreportcard.com/report/github.com/vodkabears/yaspell)
[![Coverage Status](https://coveralls.io/repos/github/VodkaBears/yaspell/badge.svg)](https://coveralls.io/github/VodkaBears/yaspell)

Yaspell checks spelling of different texts with Yandex.Speller API.
The tool is targeted to people, who works with texts and wants to get fast feedback about the quality.
If you need to use API for your app, please, use [Yandex.Speller API](https://tech.yandex.ru/speller/doc/dg/concepts/api-overview-docpage/) directly or something else.

## Installation

Next platforms are supported: Windows, Mac, Linux.

Go the the release page and download a binary for your platform and architecture from the latest release: https://github.com/vodkabears/yaspell/releases/latest. Than you can rename a binary from `yaspell_{OS}_{ARCH}` to `yaspell`.

If you have installed golang environment, just make:
```
go get -u github.com/vodkabears/yaspell
```

## Usage

Run it in the terminal:
```
yaspell [flags] [files ...]
```

Example:
```
yaspell -opts=IGNORE_UPPERCASE,IGNORE_DIGITS,IGNORE_ROMAN_NUMERALS -dict=dict.txt text1.txt text2.txt
```

### Flags

#### -opts

Yandex.Speller options.

Example: `-opts=IGNORE_UPPERCASE,IGNORE_DIGITS`

`IGNORE_UPPERCASE` ignores uppercased words
`IGNORE_DIGITS` ignores words with digits
`IGNORE_URLS` ignores urls, emails, filenames
`FIND_REPEAT_WORDS` highlights repetitions of words, consecutive
`IGNORE_LATIN` ignores latin words
`NO_SUGGEST` disables suggestions for incorrect words
`FLAG_LATIN` marks latin words as incorrect
`BY_WORDS` ignores dictionary context
`IGNORE_CAPITALIZATION` ignores the incorrect use of UPPERCASE/lowercase letters
`IGNORE_ROMAN_NUMERALS` ignores roman numerals

#### -dict

Dictionary file with regexp patterns.

Example: `-dict=dict.txt`
Regexp syntax: https://golang.org/pkg/regexp/syntax/#hdr-Syntax

dict.txt content:
```
^nananana$
^(?i)gogogogo$
```

#### -lang

Language to check.

Values: `en`, `ru`, `uk`
Default: `ru,en`
Example: `-lang=en,ru,uk`

#### -format

Text format.

Values: `html`, `plain`
Default: `plain`
Example: `-format=html`

#### -version

Prints current version.

## Todo

- Improve terminal interface.
- GUI.
- More text formats with built-in dictionaries.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Flags:
IGNORE_DIGITS ignores words with digits
IGNORE_URLS ignores urls, emails, filenames
FIND_REPEAT_WORDS highlights repetitions of words, consecutive
IGNORE_LATIN disables suggestions for incorrect words
IGNORE_LATIN ignores latin words
NO_SUGGEST disables suggestions for incorrect words
FLAG_LATIN marks latin words as incorrect
BY_WORDS ignores dictionary context
IGNORE_CAPITALIZATION ignores the incorrect use of UPPERCASE/lowercase letters
Expand Down

0 comments on commit 12b407b

Please sign in to comment.