Translate text with deepl
jq
curl
- Clone the repository:
git clone https://github.com/LordPax/translate.git
cd translate
- Execute the script to generate config file in
.config/translate
./translate
- Create dotenv file
~/.config/translate/config
with your needed information like api key
USED_ENGINE=deepl
DEEPL_ROUTE=https://api-free.deepl.com/v2/translate
DEEPL_KEY=mandatory if you use deepl
LIBRE_ROUTE_DETECT=localhost:5000/detect
LIBRE_ROUTE=localhost:5000/translate
LIBRE_KEY=not mandatory if route is on localhost
Usage : translate <option> [text]
Option :
-h or --help ........................... Show help
-v or --version ........................ Show version
-e or --engine <engine> ................ Set engine (default : deepl)
-s <lang> .............................. Source language
-t <lang> .............................. Target language
Engine :
* deepl
* libre
Example :
translate -t fr "Hello World!"
echo "Hello World!" | translate -t fr