From c7ba043dec74b64ed899d9d866a6e3a44df9e7a2 Mon Sep 17 00:00:00 2001 From: Aaron Johnon Date: Wed, 28 Aug 2024 19:06:35 -0500 Subject: [PATCH] Added functionalities to show input from pipe and if repeat mode is on --- numberstation.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/numberstation.go b/numberstation.go index fe0f9c8..58e812f 100644 --- a/numberstation.go +++ b/numberstation.go @@ -43,6 +43,10 @@ func main() { var input string + if *repeat { + fmt.Println("Repeat mode is ON") + } + // Check if input is being redirected from a file if isInputFromPipe() { // Read from stdin (file input) @@ -57,6 +61,10 @@ func main() { return } input = inputBuilder.String() + + // Display the input, filtered to uppercase, before playback + fmt.Println("Input:\n") + fmt.Println(strings.ToUpper(input)) } else { // Use readline for interactive input rl, err := readline.NewEx(&readline.Config{ @@ -104,7 +112,7 @@ func main() { return r == ' ' || r == '-' || r == '_' || r == '\n' || r == '\r' }) - fmt.Println("Beginning playback...") + fmt.Print("Beginning playback... ") for _, section := range sections { numRepeats := 1