diff --git a/cmd/suwako/main.go b/cmd/suwako/main.go index 4151d20..551e943 100644 --- a/cmd/suwako/main.go +++ b/cmd/suwako/main.go @@ -1,4 +1,4 @@ -// $TheSupernovaDuo: suwako,v 1.5.0 2023/03/25 10:41:00 akoizumi Exp +// $TheSupernovaDuo: suwako,v 1.5.1 2023/4/15 23:9:28 yakumo_izuru Exp $ // Command line client for SimplyTranslate, a privacy friendly frontend to other translation engines package main @@ -38,7 +38,10 @@ func main() { flag.Parse() if len(engine) == 0 || len(instance) == 0 { - log.Fatal("SUWAKO_ENGINE and/or SUWAKO_INSTANCE are unset") + log.Println("SUWAKO_ENGINE and/or SUWAKO_INSTANCE are unset") + log.Println("Defaulting to translate.chaotic.ninja with engine 'google'") + engine = "google" + instance = "https://translate.chaotic.ninja" } if len(input) == 0 { log.Fatal("Missing input text.") @@ -56,9 +59,7 @@ func main() { // JSON decoding _ = json.NewDecoder(resp.Body).Decode(&translate) sanityCheck(err) - // Pretty-print both the input and the output given. - fmt.Printf("Input: %v\n", input) - fmt.Printf("Output: %v\n",translate.Output) + fmt.Printf("%v\n",translate.Output) } func sanityCheck(err error) { if err != nil {