deepl-translate-cli

command module
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 11 Imported by: 0

README

go-test goreleaser

✍️Deepl translate cli

sampleMovie

Installation

By github release page
  1. Download zipped file from Releases.

  2. Unzip downloaded file.

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

By go install
go install github.com/Omochice/deepl-translate-cli@latest

Usage

  1. Get deepl access token. See here.

  2. Set access token as DEEPL_TOKEN

    ex. in Bash.

    export DEEPL_TOKEN <YOUR TOKEN>
    
  3. On the first run, if <user home directory>/.config/deepl-translate-cli/setting.json does not exist, make it automatically.

    The format of setting file is below.

    {
      "source_lang": "FILLIN",
      "target_lang": "FILLIN"
    }
    

    For write setting file, see this page.

  4. If file path is not specified, load text from STDIN.

    Currentry, only one path can be specified as argument.

  • If you want to use source_lang/target_lang without using setting file, try to use --source_lang (-s) or target_lang (-t) argument.

    cat <text.txt> | deepl-translate-cli --source_lang ES --target_lang DE
    
  • If you use Pro plan, use --pro flag to switch endpoint URL.

    this feature is not tested because I use free plan.

    cat <text.txt> | deepl-translate-cli --pro
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL