Skip to content

Commit

Permalink
Merge pull request #5 from Omochice/1
Browse files Browse the repository at this point in the history
Create Readme. resolve #1
  • Loading branch information
Omochice authored Jun 4, 2021
2 parents 0e7203f + d88cded commit 766953e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ✍️Deepl translate cli

## Installation

1. Download zipped file from [Releases](https://github.com/Omochice/deepl-translate-cli/releases).

2. Unzip downloaded file.

3. Move executable file into directory in PATH. (like `$HOME/.local/bin/`)


## Before using

1. Get deepl access token. See [here](https://www.deepl.com/docs-api).

2. Set access token as `DEEPL_TOKEN`
ex. in `Bash`.
```bash
export DEEPL_TOKEN <YOUR TOKEN>
```

3. Make configure file in `<user home directory>/.config/deepl-translation/setting.json`.

If run command without existing setting file, auto make it.

For write setting file, see [this page](https://www.deepl.com/docs-api/translating-text/request/).

## Usage

- If you want translate from existing file.
```console
$ deepl-translate <text.txt>
```

- If you want use stdin.
- with pipe
```console
$ echo "hello" | deepl-translation --stdin
```
- with input
```console
$ deepl-translation --stdin
<input text that wanted translate> <Enter>
```

0 comments on commit 766953e

Please sign in to comment.