# deepl-cli
[![Release Package](
<https://github.com/eggplants/deepl-cli/workflows/Release%20Package/badge.svg>
)](
<https://github.com/eggplants/deepl-cli/actions/workflows/release.yml>
) [![Test](
<https://github.com/eggplants/deepl-cli/actions/workflows/test.yml/badge.svg>
)](
<https://github.com/eggplants/deepl-cli/actions/workflows/test.yml>
) [![PyPI version](
<https://badge.fury.io/py/deepl-cli.svg>
)](
<https://badge.fury.io/py/deepl-cli>
)
[![Maintainability](
<https://api.codeclimate.com/v1/badges/a56630914df8538ca93b/maintainability>
)](
<https://codeclimate.com/github/eggplants/deepl-cli/maintainability>
) [![pre-commit.ci status](
<https://results.pre-commit.ci/badge/github/eggplants/deepl-cli/master.svg>
)](
<https://results.pre-commit.ci/latest/github/eggplants/deepl-cli/master>
)
![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 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
```python
from deepl import DeepLCLI
deepl = 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
Raw data
{
"_id": null,
"home_page": "https://github.com/eggplants/deepl-cli",
"name": "deepl_cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.8",
"maintainer_email": null,
"keywords": "deepl, translate, cli",
"author": "eggplants",
"author_email": "w10776e8w@yahoo.co.jp",
"download_url": "https://files.pythonhosted.org/packages/dc/ee/481e5b699e01b2a0ccc69299ce5c861badda1fae712559bbd6ba4beb58e4/deepl_cli-0.7.0.tar.gz",
"platform": null,
"description": "# deepl-cli\n\n[![Release Package](\n <https://github.com/eggplants/deepl-cli/workflows/Release%20Package/badge.svg>\n )](\n <https://github.com/eggplants/deepl-cli/actions/workflows/release.yml>\n) [![Test](\n <https://github.com/eggplants/deepl-cli/actions/workflows/test.yml/badge.svg>\n )](\n <https://github.com/eggplants/deepl-cli/actions/workflows/test.yml>\n) [![PyPI version](\n <https://badge.fury.io/py/deepl-cli.svg>\n )](\n <https://badge.fury.io/py/deepl-cli>\n)\n\n[![Maintainability](\n <https://api.codeclimate.com/v1/badges/a56630914df8538ca93b/maintainability>\n )](\n <https://codeclimate.com/github/eggplants/deepl-cli/maintainability>\n) [![pre-commit.ci status](\n <https://results.pre-commit.ci/badge/github/eggplants/deepl-cli/master.svg>\n )](\n <https://results.pre-commit.ci/latest/github/eggplants/deepl-cli/master>\n)\n\n![image](https://user-images.githubusercontent.com/42153744/159145088-752decf7-8736-44c3-86aa-37fd0cee83df.png)\n\n- [DeepL Translator](https://www.deepl.com/translator) CLI using [playwright-python](https://github.com/microsoft/playwright-python)\n\nNote: *This project works without DeepL API key. With DeepL API, use [DeepLcom/deepl-python](https://github.com/DeepLcom/deepl-python)*\n\n## Install\n\n```bash\npip install deepl-cli\n```\n\n## Usage\n\n## CLI\n\n```shellsession\n$ deepl -h\nusage: deepl [-h] (-f PATH | -s) [--fr FR] --to TO [-t MS] [-v] [-V]\n\nDeepL Translator CLI without API Key\n\noptional arguments:\n -h, --help show this help message and exit\n -f PATH, --file PATH source text file to translate (default: None)\n -s, --stdin read source text from stdin (default: False)\n --fr FR input language (default: auto)\n --to TO output language (default: None)\n -t MS, --timeout MS timeout interval (default: 5000)\n -v, --verbose make output verbose (default: False)\n -V, --version show program's version number and exit\n\nvalid languages of `--fr`:\n{'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'}\n\nvalid languages of `--to`:\n{'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'}\n```\n\n## Package\n\n```python\nfrom deepl import DeepLCLI\n\ndeepl = DeepLCLI(\"en\", \"ja\")\ndeepl.translate(\"hello\") #=> \"\u3053\u3093\u306b\u3061\u308f\"\n```\n\nIf you use with asyncio, Use `DeepLCLI.translate_async`. See [examples/async.py](https://github.com/eggplants/deepl-cli/blob/master/examples/async.py).\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "DeepL Translator CLI without API Key",
"version": "0.7.0",
"project_urls": {
"Homepage": "https://github.com/eggplants/deepl-cli",
"Repository": "https://github.com/eggplants/deepl-cli"
},
"split_keywords": [
"deepl",
" translate",
" cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b16b226c37cb16c899444405796030b58daec6dab5048aa04a29d576a0efd703",
"md5": "e51e5a7957d306666b4436b74579cb8b",
"sha256": "3b42358df8fe47c97e0483d3da0afd885113b16f15a3e3a3ee385fca6775b012"
},
"downloads": -1,
"filename": "deepl_cli-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e51e5a7957d306666b4436b74579cb8b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.8",
"size": 7291,
"upload_time": "2024-04-30T03:21:56",
"upload_time_iso_8601": "2024-04-30T03:21:56.096572Z",
"url": "https://files.pythonhosted.org/packages/b1/6b/226c37cb16c899444405796030b58daec6dab5048aa04a29d576a0efd703/deepl_cli-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dcee481e5b699e01b2a0ccc69299ce5c861badda1fae712559bbd6ba4beb58e4",
"md5": "c5a5a1939834ecfbca85cecf1c836f84",
"sha256": "f96f3e19b4eb9933ec693e56a44fb176d57c0368dbb9ce0e93e1cb8ffc410e7c"
},
"downloads": -1,
"filename": "deepl_cli-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "c5a5a1939834ecfbca85cecf1c836f84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.8",
"size": 6412,
"upload_time": "2024-04-30T03:21:57",
"upload_time_iso_8601": "2024-04-30T03:21:57.272956Z",
"url": "https://files.pythonhosted.org/packages/dc/ee/481e5b699e01b2a0ccc69299ce5c861badda1fae712559bbd6ba4beb58e4/deepl_cli-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-30 03:21:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eggplants",
"github_project": "deepl-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "deepl_cli"
}