Giter Site home page Giter Site logo

godeepl's Introduction

goDeepL

goDeepL is a command-line tool for translating text using the DeepL API. It allows you to easily translate text between different languages, view the current API key, and update the API key.

Build Instructions

To build the goDeepL executable, use the following command:

  go build -o ./Build/goDeepL.exe

This will generate the executable file at ./Build/goDeepL.exe.

Usage

Translating Text

To translate text from one language to another, use the translate mode:

goDeepL -mode translate -from EN -to RU -text "hello world"

or you can use the shortcuts:

goDeepL translate -from EN -to RU -text "hello world"

Viewing Help

To display the usage help, use the help flag:

goDeepL -help

Updating the API Key

To use the goDeepL tool, you need a valid DeepL API key. You can update the API key using the update-key mode:

goDeepL -mode update-key

This command will prompt you to enter a new API key.

Command Reference

  • translate: Translates text from the source language to the target language.
    • -from: Specifies the source language (default: SP).
    • -to: Specifies the target language (default: EN).
    • -text: Specifies the text to be translated (default: "Hello!").
  • view-key: Displays the current API key.
  • update-key: Updates the DeepL API key.
  • delete-key: Deletes the DeepL API key. (not yet implemented!)
  • help: Displays the usage help.

Example Commands

Translate text from English to Russian:

goDeepL translate -from EN -to RU -text "hello world"

Translate text from Spanish to English:

goDeepL translate -from ES -to EN -text "hola mundo!"

View usage help:

goDeepL -help

Update the DeepL API key:

goDeepL -mode update-key

View the DeepL API key:

goDeepL -mode view-key

Notes

  • Ensure you have a valid DeepL API key to use the translate functionality.
  • The API key is stored in a key.json file in the .goDeepL directory within your home directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • DeepL API for providing the translation service.

godeepl's People

Contributors

chacoff avatar

Stargazers

 avatar  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.