DeepL Translator CLI using Selenium
Project description
deepl-cli
- DeepL Translator CLI using Selenium
- Translate standard input into a specified language
- Under development on Ubuntu 20.04 LTS and Python3.8
Try on Google Cloud Shell
# First,
$ wget -O - https://gist.githubusercontent.com/eggplants/9996e976fadff8bae9bdfb8628ce07d3/raw/784e9ea1f4385c05c98e1d42840809aec8ca597f/gcp_deeplcli_setup.sh|bash
# example
$ deepl en:ja < README-cloudshell.txt
Install
$ pip install deepl-cli
$ sudo apt install chromium-browser chromium-chromedriver python3-selenium -y
$ sudo apt update && sudo apt -f install -y
Requirements
- Python >= 3.8 (Because of
:=
, Walrus operator) - chromium-browser
- chromium-chromedriver
- python3-selenium
- selenium
- selenium@PyPI
Usage
$ deepl
SYNTAX:
$ (...) | deepl <from:lang>:<to:lang>
$ deepl <from:lang>:<to:lang> <<'EOS'
(...)
EOS
$ deepl <from:lang>:<to:lang> <<<"(...)"
USAGE:
$ echo Hello | deepl en:ja
$ deepl :ru <<'EOS' # :ru is equivalent of auto:ru
good morning!
good night.
EOS
$ deepl fr:zh <<<"Mademoiselle"
LANGUAGE CODES:
<from:lang>: {(empty)=auto, ja, en, de, fr, es, pt, it, nl, pl, ru, zh}
<to:lang>: {ja, en, de, fr, es, pt, it, nl, pl, ru, zh}
TIPS:
To use this, run:
$ sudo apt install chromium-browser chromium-chromedriver python3-selenium -y
$ sudo apt update && sudo apt -f install -y
Lisence
MIT
Author
Haruna(eggplants)
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-0.0.6.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for deepl_cli-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26382a7ce6655b865ae5a5fc5ba0e653a065de11f71437fe09e801f91a37527f |
|
MD5 | b5f1412f4ed92bc145b9d511cca0eedb |
|
BLAKE2b-256 | 48b9688e19bdfd7ba0fce6f93c5ac4ded31b9a59a07367ec0b50c792fbc951b7 |