A command-line interface for Google Translate
Here is the basic usage of this tool:
USAGE: google-translate-cli [COMMAND] [OPTIONS]
A command-line interface for Google Translate
COMMANDS:
translate [*] Translate the text and output to standard output.
list List of supported languages.
OPTIONS:
--help, -h Show usage information and exit
--target-language <target-language>, -t <target-language> Set the target language.
--source-language <source-language>, -s <source-language> Set the source language.You need to add this line to your Eask file (global recommanded).
(source 'gnu)
(source 'melpa)
(source 'jcs-elpa)
(source 'eine)Then, install it:
eask install -g google-translate-cliTo translate text:
eask -g exec google-translate-cli translate "hello world!" -t "zh-TW"The output:
你好世界!You can configure translation behaviour from the Eask file.
(setq google-translate-cli-source-language "en"
google-translate-cli-target-language "auto")If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!
To run the test locally, you will need the following tools:
Link this package as a global dependency:
eask -g link add google-translate-cli </path/to/project/dir/>Then execute the command:
eask -g exec google-translate-cli --help📝 P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
See LICENSE for details.