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 -F en -T ja -s <<<'This tool is useful for me.'
# このツールは私にとって便利だ。
deepl -F ja -T en -s <<<'このツールは私にとって便利だ。'
# This tool is useful for me.
curl https://example.com | sed -nr '/^<body>/,/<\/body>/s/<[^>]+>//gp' | tr -d \\n > txt
deepl -f txt -F en -T ja
# 例文ドメイン このドメインは、文書の例文に使用するためのものです。事前の調整や許可を得ることなく、このドメインを文献で使用することができます。 詳細はこちら
$ deepl -h
usage: deepl [-h] (-f PATH | -s) -F FR -T TO [-t MS] [-v] [-V]
DeepL Translator CLI without API Key
options:
-h, --help show this help message and exit
-f, --file PATH source text file to translate (default: None)
-s, --stdin read source text from stdin (default: False)
-F, --fr FR input language (default: None)
-T, --to TO output language (default: None)
-t, --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 `-F` / --fr`:
{'cs', 'fr', 'ru', 'hu', 'zh', 'da', 'nl', 'es', 'lv', 'nb', 'de', 'ko', 'it', 'pt', 'pl', 'et', 'ar', 'el', 'en', 'id', 'sv', 'ro', 'ja', 'uk', 'bg', 'sk', 'fi', 'tr', 'sl', 'lt'}
valid languages of `-T` / `--to`:
{'cs', 'fr', 'ru', 'hu', 'zh', 'da', 'nl', 'en-gb', 'es', 'lv', 'nb', 'de', 'ko', 'it', 'pt', 'zh-hans', 'pl', 'et', 'pt-br', 'ar', 'el', 'en', 'id', 'sv', 'ro', 'ja', 'uk', 'bg', 'en-us', 'sk', 'zh-hant', 'pt-pt', 'fi', 'tr', 'sl', 'lt'}
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 Distribution
deepl_cli-2.2.0.tar.gz
(8.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepl_cli-2.2.0.tar.gz.
File metadata
- Download URL: deepl_cli-2.2.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a62fa7f4a746021d65cdf45318007050ef458a46be5bd2db58479171fa969e71
|
|
| MD5 |
24450fe94fc756a84f93f6c390a6e11f
|
|
| BLAKE2b-256 |
28244d4763e3e68cc8207e57b28ea50b4cc5ff785fe53273418d0f729aa6bb84
|
File details
Details for the file deepl_cli-2.2.0-py3-none-any.whl.
File metadata
- Download URL: deepl_cli-2.2.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2782ac6104e31eaf90d7fd0534074742c58589666eaf65a706c44ad0385e127f
|
|
| MD5 |
476b8b075722a263add56685c85bb546
|
|
| BLAKE2b-256 |
a00f1a0a634fb691f6dd8d5a314970144ce2f1fe6b4afc42565c39c04971cdae
|