Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eggplants/deepl-cli
DeepL Translator CLI (without API Key)
https://github.com/eggplants/deepl-cli
cli deepl-translator docker puppeteer pyppeteer python translator
Last synced: 10 days ago
JSON representation
DeepL Translator CLI (without API Key)
- Host: GitHub
- URL: https://github.com/eggplants/deepl-cli
- Owner: eggplants
- License: mit
- Created: 2020-05-13T02:45:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-07T17:16:07.000Z (about 1 month ago)
- Last Synced: 2024-10-25T12:38:11.621Z (16 days ago)
- Topics: cli, deepl-translator, docker, puppeteer, pyppeteer, python, translator
- Language: Python
- Homepage: https://pypi.org/project/deepl-cli/
- Size: 468 KB
- Stars: 258
- Watchers: 4
- Forks: 18
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-for-oneliner - deepl-cli - DeepL Translator CLI written in Python (Translate / Open USP Tsukubai)
README
# deepl-cli
[![Release Package](
)](
) [![Test](
)](
) [![PyPI version](
)](
)[![Maintainability](
)](
) [![pre-commit.ci status](
)](
)![image](https://user-images.githubusercontent.com/42153744/159145088-752decf7-8736-44c3-86aa-37fd0cee83df.png)
- [DeepL Translator](https://www.deepl.com/translator) CLI using [playwright-python](https://github.com/microsoft/playwright-python)
Note: *This project works without DeepL API key. With DeepL API, use [DeepLcom/deepl-python](https://github.com/DeepLcom/deepl-python)*
## Install
```bash
pip install deepl-cli
```## Usage
## CLI
```shellsession
$ 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 exitvalid 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
```python
from deepl import DeepLCLIdeepl = DeepLCLI("en", "ja")
deepl.translate("hello") #=> "こんにちわ"
```If you use with asyncio, Use `DeepLCLI.translate_async`. See [examples/async.py](https://github.com/eggplants/deepl-cli/blob/master/examples/async.py).
## License
MIT