DeepL Translator CLI without API Key
Project description
deepl-cli
- DeepL Translator CLI using playwright-python
Note: This project works without DeepL API key. With DeepL API, use DeepLcom/deepl-python
Install
pip install deepl-cli
Usage
CLI
$ deepl -h
usage: deepl [-h] (-f PATH | -s) [--fr FR] --to TO [-t MS] [-v] [-V]
DeepL Translator CLI without API Key
optional arguments:
-h, --help show this help message and exit
-f PATH, --file PATH source text file to translate (default: None)
-s, --stdin read source text from stdin (default: False)
--fr FR input language (default: auto)
--to TO output language (default: None)
-t MS, --timeout MS timeout interval (default: 5000)
-v, --verbose make output verbose (default: False)
-V, --version show program's version number and exit
valid languages of `--fr`:
{'fi', 'cs', 'lv', 'nl', 'el', 'auto', 'ru', 'da', 'sv', 'it', 'uk', 'zh', 'ko', 'et', 'de', 'en', 'es', 'bg', 'lt', 'ja', 'pl', 'tr', 'id', 'sk', 'sl', 'hu', 'fr', 'ro', 'pt'}
valid languages of `--to`:
{'fi', 'cs', 'lv', 'nl', 'lt', 'ja', 'el', 'pl', 'ru', 'tr', 'da', 'sv', 'pt', 'id', 'it', 'sk', 'sl', 'hu', 'fr', 'uk', 'zh', 'ko', 'et', 'de', 'en', 'ro', 'es', 'bg'}
Package
from deepl import DeepLCLI
deepl = DeepLCLI("en", "ja")
deepl.translate("hello") #=> "こんにちわ"
If you use with asyncio, Use DeepLCLI.translate_async
. See examples/async.py.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for deepl_cli-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb059572caf11a901485737413e8695fa90e9e09681410cca4d3469a8e36a79 |
|
MD5 | 9a1726183a728e83f34e29989cbcb1ce |
|
BLAKE2b-256 | 9398df1d6eb135ad9d165db161e98c00bce0b06e2cac2cd55a1d4d52b815d7eb |