# textr-cli

> Command line interface for Textr

Latest version **0.4.0** (published 2018-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install textr-cli
pnpm add textr-cli
yarn add textr-cli
bun add textr-cli
```

Provides the command `textr`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2018-03-23 |
| First published | 2015-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12 |
| Dependencies | 4 |
| Unpacked size | 108.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Denys Dovhan |
| Maintainers | denysdovhan, iamstarkov, shuvalov-anton |
| Keywords | cli, cli-app, textr, typo, typography, typographic, transformer |

## Links

- npm: https://www.npmjs.com/package/textr-cli
- Repository: https://github.com/denysdovhan/textr-cli
- Homepage: https://github.com/denysdovhan/textr-cli#readme
- Issues: https://github.com/denysdovhan/textr-cli/issues
- npm.io page: https://npm.io/package/textr-cli

## Dependencies (4)

- [meow](https://npm.io/package/meow.md) ^3.5.0
- [textr](https://npm.io/package/textr.md) ^0.3.0
- [chokidar](https://npm.io/package/chokidar.md) ^2.0.0
- [get-stdin](https://npm.io/package/get-stdin.md) ^6.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2018-03-23
- 0.3.2 — 2017-10-03
- 0.3.1 — 2017-06-16
- 0.3.0 — 2017-01-21
- 0.2.3 — 2016-08-15
- 0.2.2 — 2016-02-08
- 0.2.1 — 2015-12-11
- 0.2.0 — 2015-11-15
- 0.1.0 — 2015-11-08

## README

# textr-cli

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Dependency Status][depstat-image]][depstat-url]

> Command line interface for [Textr][textr]

It can compose any functions that transforms text using [Textr][textr]. For example, check out few: [typographic-quotes][typographic-quotes],
[typographic-math-symbols][typographic-math-symbols],
[typographic-em-dashes][typographic-em-dashes] and [typographic-ellipses][typographic-ellipses].

## Install

Install `textr` globaly:

    npm install -g textr-cli

## Usage

After install, you can use `textr` command for processing your text files, like this:

```sh
# load from file, transformers required through few -t flags
$ textr foo.md -t typographic-quotes -t typographic-quotes

# load from file, transformers required through one -t
$ textr foo.md -t typographic-single-spaces,typographic-quotes

# load through stdin, iso-locale equals ru, transformers using --transforms
$ cat foo.md | textr -l ru --transforms=typographic-single-spaces

# load through stdin, write result into file
$ cat foo.md | textr -o bar.md
```

## Options

You can use `textr` with specified options:

*  `-t`, `--transforms` — array of transformers, which will be applied (transformers should be installed globaly or localy in current project);
* `-o`, `--out-file` — write output to file;
* `-l`, `--locale` — ISO 639 locale codes (`en-us` as default);
* `-w`, `--watch` — Watch changes in source file (works only with input as first argument and output through `-o` or `--out-file` flags);
* `-h`, `--help` — show help message.

## Real world

For example, you have a markdown article with some typographic mistakes, like a three pe­ri­ods instead of el­lip­sis character or whatever else. Thanks for **textr-cli** you can easily fix this. Just run `textr` with transformers which you need and get corrected text:

```sh
$ cat foo.md
Hello,   "world"...
Yet    "another" string
Yet...    one…

$ textr foo.md -t typographic-single-spaces,typographic-quotes,typographic-ellipses
Hello, “world”…
Yet “another” string
Yet… one…
```

Typography for everybody!

## License

MIT © [Denys Dovhan](http://denysdovhan.com)

[textr]: https://github.com/A/textr

[typographic-quotes]: https://github.com/iamstarkov/typographic-quotes
[typographic-math-symbols]: https://github.com/iamstarkov/typographic-math-symbols
[typographic-em-dashes]: https://github.com/iamstarkov/typographic-em-dashes
[typographic-ellipses]: https://github.com/iamstarkov/typographic-ellips

[npm-url]: https://npmjs.org/package/textr-cli
[npm-image]: https://img.shields.io/npm/v/textr-cli.svg?style=flat

[travis-url]: https://travis-ci.org/denysdovhan/textr-cli
[travis-image]: https://img.shields.io/travis/denysdovhan/textr-cli.svg?style=flat

[depstat-url]: https://david-dm.org/denysdovhan/textr-cli
[depstat-image]: https://david-dm.org/denysdovhan/textr-cli.svg?style=flat

---
_Source: https://npm.io/package/textr-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
