An open API service indexing awesome lists of open source software.

https://github.com/hexlet/languagetool-cli

CLI for spell checking
https://github.com/hexlet/languagetool-cli

Last synced: 12 months ago
JSON representation

CLI for spell checking

Awesome Lists containing this project

README

          

# languagetool-cli

## Checking errors

```bash
docker run --rm -v ./:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js check
```

Example:

```bash
docker run --rm -v ./fixtures:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js check /content/**/*.md
```

Help:

```bash
docker run --rm -v ./fixtures:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js check -h

Usage: run check [options] [dir_path]

Fix errors with overwriting files

Arguments:
dir_path path to files (default: "/content")

Options:
-r, --rules "rule1, rule2, ..." languagetools rules
-l, --language A language code like en-US, de-DE, fr, or
auto to guess the language automatically
(default: "auto")
-i, --ignore Path to file with ignore contexts (default:
"/content/ignored_languagetool_errors")
-h, --help display help for command
```

## Fixing errors:

```bash
docker run --rm -v ./:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js fix
```

Example:

```bash
docker run --rm -v ./fixtures:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js fix /content/**/*.md
```

Help:

```bash
docker run --rm -v ./fixtures:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js fix -h

Usage: run fix [options]

Options:
-r, --rules "rule1, rule2, ..." languagetools rules
-l, --language A language code like en-US, de-DE, fr, or
auto to guess the language automatically
(default: "auto")
-h, --help display help for command
```

## To get wrong words:

```bash
docker run --rm -v ./:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js words
```

Example:

```bash
docker run --rm -v ./fixtures:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js words /content/**/*.md
```

```bash
docker run --rm -v ./:/content ghcr.io/hexlet/languagetool-cli node ./bin/run.js words -h

Options:
-r, --rules "rule1, rule2, ..." languagetools rules
-l, --language A language code like en-US, de-DE, fr, or
auto to guess the language automatically
(default: "auto")
-f, --file Destination (default: "wrong_words.txt")
-h, --help display help for command

```