honyakusha

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: MIT

README

Honyakusha

Translate text using a variety of translation services.

Installation

From Source

Ensure that you have a supported version of Go properly installed and setup. You can find the minimum required version of Go in the go.mod file.

You can then install the latest release globally by running:

$ go install github.com/souk4711/honyakusha@latest

Usage

Create a configuration file in the XDG config directory or current working directory:

$ honyakusha init
Create a config file in ./honyakusha.toml

And then execute:

$ honyakusha trans 吟味されざる生に、生きる価値なし。
Raw:

    吟味されざる生に、生きる価値なし。

Google Translate:

    A life that is not examined is not worth living.

Bing Translator:

    A life that is not examined is not worth living.

Language Code

The source and target fields in the configuration file should follow the ISO 6359 format, e.g. ja, zh-CN. All available language codes can be found in the lang.go file. Note that some language codes may not work if the translation services do not support them.

Translation Services

Code Name Auth Method
bing Bing Translator -
google Google Translate -
libretranslate-api LibreTranslate api-key

Formatter

  • html
  • json
  • plain

Howto

License

available as open source under the terms of the MIT License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL