Changeset 9 in code
Legend:
- Unmodified
- Added
- Removed
-
trunk/README
r7 r9 2 2 ===== 3 3 Command-line client for SimplyTranslate in Go. 4 5 Usage 6 ----- 7 -I string 8 Enter the text to be translated 9 -e string 10 Translation engine to use (default: google) (default "google") 11 -f string 12 Set the language to translate from. This can be skipped as it will autodetect the language you're translating from (default "auto") 13 -i string 14 Instance to use (default: https://simplytranslate.org/api/translate/) (default "https://simplytranslate.org/api/translate/") 15 -t string 16 Set the language to translate to (default: en) (default "en") 17 -
trunk/main.go
r8 r9 1 // $ KyokoNet: stcli,v 1.3 2022/12/13 23:57:00akoizumi Exp1 // $TheSupernovaDuo: stcli,v 1.3.1 2023/02/11 07:54:25 akoizumi Exp 2 2 // Command line client for SimplyTranslate, a privacy friendly frontend to other translation engines 3 3 package main … … 33 33 // Check if any of those two variables is empty. 34 34 // It actually needs the two to have content. 35 if len(input) == 0 || len(to) == 0{36 log.Fatal("Missing either the text or the target language.")35 if len(input) == 0 { 36 log.Fatal("Missing input.") 37 37 } 38 38 // Map a variable to the struct … … 45 45 sanityCheck(err) 46 46 defer resp.Body.Close() 47 // JSON decoding 47 48 _ = json.NewDecoder(resp.Body).Decode(&translate) 48 49 sanityCheck(err) -
trunk/stcli.1
r7 r9 1 .Dd Aftermath 57, 31881 .Dd Chaos 42, 3189 2 2 .Dt STCLI 1 3 3 .Os … … 31 31 .El 32 32 .Sh AUTHORS 33 .An Aoi K. Aq Mt koizumi.aoi@ kyoko-project.wer.ee33 .An Aoi K. Aq Mt koizumi.aoi@chaotic.ninja 34 34 .Pp 35 35 .An Czar of KST Aq Mt czar@kalli.st
Note:
See TracChangeset
for help on using the changeset viewer.