情報確認
$ apt show translate-shell Package: translate-shell Version: 0.9.6.9-1 Priority: optional Section: contrib/misc Maintainer: Andreas Tille <tille@debian.org> Installed-Size: 224 kB Provides: google-translate-cli Depends: gawk, libfribidi-bin Recommends: curl, rlwrap, aspell | hunspell, less | most Suggests: mplayer | mpv | mpg123 | espeak Conflicts: google-translate-cli Replaces: google-translate-cli Homepage: https://github.com/soimort/translate-shell Download-Size: 55.3 kB APT-Sources: http://ftp.jaist.ac.jp/raspbian buster/contrib armhf Packages Description: Command-line translator using Google Translate, etc. Translate Shell (formerly Google Translate CLI) is a command-line translator powered by Google Translate (default), Bing Translator, Yandex.Translate, DeepL Translator and Apertium. It gives you easy access to one of these translation engines in your terminal.
aptにある。以前はコードをビルドして自分で配置していたのに。改善された。ありがとう。ちょっと古いけど気にしない。
手順
sudo apt install -y translate-shell
使ってみる
trans -b en:ja 'My name is Andy.'
trans -sp 'なんかしゃべる'
対象環境
- Raspbierry pi 4 Model B
- Raspberry Pi OS buster 10.0 2020-08-20 ※
- bash 5.0.3(1)-release
$ uname -a Linux raspberrypi 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux