Added functionalities to show input from pipe and if repeat mode is on

pull/2/head
Aaron Johnon 1 year ago
parent 57cbc99379
commit c7ba043dec

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

Loading…
Cancel
Save