Есть ли что-то вроде Google Translate, но для ПК?

С zsh :

print -r -- *(.Dom[5])

дает вам 5-й файл в текущем каталоге, отсортированный по времени одификации m . Измените m на a , чтобы отсортировать по a времени доступа. . и D включают только обычные и скрытые файлы.

7
02.04.2018, 10:39
2 ответа

Инструмент командной строки:translate-shell

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 install translate-shell

например,:

trans 'Salut!, Bonjour!, Soyez le bienvenu!'

Пример вывода:

Salut!, Bonjour!, Soyez le bienvenu!
(null)

Hi!, Hello!, Welcome!
/null/

Translations of Salut!, Bonjour!, Soyez le bienvenu!
[ Français -> English ]

Salut!, Bonjour!, Soyez le bienvenu!
    Hi!, Hello!, Welcome!

Подробнее см. trans --help.

Вы можете использовать опцию -pдля активации синтезатора речи:

trans 'Buenos días. ¿Cómo estás?' -p

Чтобы изменить целевой язык, используйте [source_LANG]:[target_LANG], например,:(с испанского на французский):

trans es:fr 'Buenos días. ¿Cómo estás?'

или:

trans -s es -t fr 'Buenos días. ¿Cómo estás?'

Домашняя страница на github.

10
27.01.2020, 20:15

weboobтакже может это сделать:

Weboob is a collection of applications able to interact with websites, without requiring the user to open them in a browser. It also provides well-defined APIs to talk to websites lacking one.

Я обнаружил, что Ubuntu 16.04.3 ltsимеет старую версию weboob. лучше клонировать прямо изgit:

$ git clone https://git.weboob.org/weboob/devel.git weboob && cd weboob

Запустить модуль translaboobвручную:

$./tools/local_run.sh  translaboob

При первом запуске вам нужно будет выбрать серверную часть, которую вы хотите использовать:

Warning: there is currently no configured backend for translaboob
Do you want to configure backends? (Y/n): Y

Available modules:
1) [ ] ebonics           English to Ebonics translation service
2) [ ] googletranslate   Google translation web service
3) [ ] larousse          larousse dictionary translations
4) [ ] wordreference     Free online translator
a) --all--               install all backends
q) --stop--

В этом примере мы выбираемgoogletranslate:

Select a backend to create (q to stop): 2
Backend "googletranslate" successfully added.

Available modules:
1) [ ] ebonics           English to Ebonics translation service
2) [X] googletranslate   Google translation web service
3) [ ] larousse          larousse dictionary translations
4) [ ] wordreference     Free online translator
a) --all--               install all backends
q) --stop--

После нажатия qвы можете ввести предложение для перевода, например:

Select a backend to create (q to stop): q
Right right!
Welcome to translaboob v1.4

Copyright(C) 2012-2018 Lucien Loiseau
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: googletranslate

translaboob> translate en de 'The quick brown fox jumps over the lazy dog'
* googletranslate
        Der schnelle braune Fuchs springt über den faulen Hund
translaboob> translate en ko 'The quick brown fox jumps over the lazy dog'
* googletranslate
        빠른 갈색 여우는 게으른 개를 뛰어 넘습니다.
4
27.01.2020, 20:15

Теги

Похожие вопросы