|
|
|
@ -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
|
|
|
|
|