From 4a1dec225226c2cd2b2a8c43071b37efb11b638e Mon Sep 17 00:00:00 2001 From: Yonah Date: Thu, 19 Mar 2026 01:22:45 +0900 Subject: [PATCH] cmd/streamdata: format youtube title Useful for uploading VODs to youtube. Signed-off-by: Yonah --- cmd/streamdata/format.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/streamdata/format.go b/cmd/streamdata/format.go index 0b4cf8b..85271fb 100644 --- a/cmd/streamdata/format.go +++ b/cmd/streamdata/format.go @@ -8,9 +8,14 @@ import ( // printVOD prints a text representation of [streamdata.VOD] to stdout. func printVOD(v *streamdata.VOD) { - fmt.Println("Title :", v.Title) - fmt.Println("Date :", v.Date.Format("2006-01-02")) + date := v.Date.Format("2006-01-02") + + fmt.Println("Title :", v.Title) + fmt.Println("Date :", date) 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) } }