Skip to content

cage1016/wason-translator-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wason Translator CLI

ReleaseGitHub release (latest by date)

Usage

Visti releases to download latest version

$ ./wason-translator-cli
Using config file: /Users/kaichuchung/.wason-translator-cli.yaml
Translate Document via IBM Cloud Language Translator

Usage:
  wason-translator-cli [flags]
  wason-translator-cli [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  delete      Delete translated document.
  download    Download translated document.
  help        Help about any command
  list        Lists documents that have been submitted for translation.
  translate   Submit a document for translation.

Flags:
      --api_key string   IBM Cloud Language Translator API KEY (default "API KEY")
      --config string    config file (default is $HOME/.wason-translator-cli.yaml)
  -h, --help             help for wason-translator-cli
  -t, --toggle           Help message for toggle
      --url string       IBM Cloud Language Translator API URL (default "URL")
      --version string   IBM Cloud Language Translator API VERSION (default "VERSION")

Use "wason-translator-cli [command] --help" for more information about a command.
  1. Prepare $HOME/.wason-translator-cli.yaml. Vist Language Translator - IBM Cloud request apiKey & url

    API_KEY=<replace-your-api-key>
    URL=<replace-url>
    cat <<EOF >> $HOME/.wason-translator-cli.yaml
    api_key: ${API_KEY}
    url: ${URL}
    version: 2018-05-01
    EOF
  2. Translate a file

    .doc, .docx, .ppt, .pptx, .xls, .xlsx, .rtf, .odt, .odp, .ods, .pdf, .htm, .html, .xml, .json, .txt

    asciicast

  3. Download the translated file

    asciicast

  4. Delete the translated file

    asciicast

Contribute

If you find any bug or want to propose a new feature, please open an issue to discuss it.

License

This repository contains free software released under the MIT Licence. Please check out the LICENSE file for details.