chore: supress printing YouTube transcripts/comments and grabed Web Sites if a pattern is defined

This commit is contained in:
Eugen Eisler 2024-09-29 19:33:09 +02:00 committed by GitHub
parent cab365f496
commit 913210d2a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -134,7 +134,7 @@ func Cli(version string) (message string, err error) {
return return
} }
fmt.Println(transcript) // fmt.Println(transcript)
currentFlags.AppendMessage(transcript) currentFlags.AppendMessage(transcript)
} }
@ -147,13 +147,14 @@ func Cli(version string) (message string, err error) {
commentsString := strings.Join(comments, "\n") commentsString := strings.Join(comments, "\n")
fmt.Println(commentsString) // fmt.Println(commentsString)
currentFlags.AppendMessage(commentsString) currentFlags.AppendMessage(commentsString)
} }
if currentFlags.Pattern == "" { if currentFlags.Pattern == "" {
// if the pattern flag is not set, we wanted only to grab the transcript or comments // if the pattern flag is not set, we wanted only to grab the transcript or comments
fmt.Println(currentFlags.Message)
return return
} }
} }
@ -165,7 +166,7 @@ func Cli(version string) (message string, err error) {
return return
} }
fmt.Println(message) //fmt.Println(message)
currentFlags.AppendMessage(message) currentFlags.AppendMessage(message)
} }
@ -176,13 +177,14 @@ func Cli(version string) (message string, err error) {
return return
} }
fmt.Println(message) //fmt.Println(message)
currentFlags.AppendMessage(message) currentFlags.AppendMessage(message)
} }
if currentFlags.Pattern == "" { if currentFlags.Pattern == "" {
// if the pattern flag is not set, we wanted only to grab the url or get the answer to the question // if the pattern flag is not set, we wanted only to grab the url or get the answer to the question
fmt.Println(currentFlags.Message)
return return
} }
} }