GithubHelp home page GithubHelp logo

dt's Introduction

dt (DeepL Translation)

Go License

A simple command line application to translate with DeepL API.

This application only supports DeepL API Free, and does not currently support other APIs.

Installing

go install github.com/kinpoko/dt@latest

Usage

  1. Obtain an authentication key for the DeepL API. For information on how to obtain an authentication key, please see the official documentation.
  2. Set the authentication key as an environment variable named DEEPL_TOKEN.

.bashrc

export DEEPL_TOKEN=<authentication key>
  1. Translate text using the following command:
dt Hello World
ハロー・ワールド

Use the -h flag to view the help menu and command line options:

dt -h
A simple command line application to translate with deepl API.

Usage:
  dt [text] [flags]

Flags:
  -h, --help            help for dt
  -s, --source string   source language   (default "en")
  -t, --target string   target language   (default "ja")

Using Pipe

You can use dt with other command line utilities by piping text to the application. For example, to translate the contents of a file named text.txt, you can use the following command:

cat text.txt | xargs dt

This will translate the text in the text.txt file and output the resulting translation to the command line.

dt's People

Contributors

kkinos avatar

Stargazers

Andrew Johnson avatar Lucas Bremgartner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.