cmd/streamdata: format youtube title
Useful for uploading VODs to youtube. Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
@@ -8,9 +8,14 @@ import (
|
|||||||
|
|
||||||
// printVOD prints a text representation of [streamdata.VOD] to stdout.
|
// printVOD prints a text representation of [streamdata.VOD] to stdout.
|
||||||
func printVOD(v *streamdata.VOD) {
|
func printVOD(v *streamdata.VOD) {
|
||||||
fmt.Println("Title :", v.Title)
|
date := v.Date.Format("2006-01-02")
|
||||||
fmt.Println("Date :", v.Date.Format("2006-01-02"))
|
|
||||||
|
fmt.Println("Title :", v.Title)
|
||||||
|
fmt.Println("Date :", date)
|
||||||
if v.Category != "" {
|
if v.Category != "" {
|
||||||
fmt.Println("Category:", v.Category)
|
fmt.Println("Category :", v.Category)
|
||||||
|
fmt.Printf("YouTube : %s | %s | %s\n", v.Title, v.Category, date)
|
||||||
|
} else {
|
||||||
|
fmt.Printf("YouTube : %s | %s\n", v.Title, date)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user