Skip to content

Commit 34c0dd9

Browse files
committed
Make twitch-chat-download command print the CSV header
1 parent 2ace1b7 commit 34c0dd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

markut.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ type Chunk struct {
7272
}
7373

7474
const ChunksFolder = "chunks"
75+
const TwitchChatDownloaderCSVHeader = "time,user_name,user_color,message"
7576

7677
func (chunk Chunk) Name() string {
7778
inputPath := strings.ReplaceAll(chunk.InputPath, "/", "_")
@@ -923,7 +924,7 @@ var Subcommands = map[string]Subcommand{
923924
}
924925

925926
if *csvPtr {
926-
fmt.Printf("time,user_name,user_color,message\n");
927+
fmt.Printf("%s\n", TwitchChatDownloaderCSVHeader);
927928
var cursor Millis = 0
928929
for _, chunk := range context.chunks {
929930
for _, messageGroup := range chunk.ChatLog {
@@ -1265,6 +1266,7 @@ var Subcommands = map[string]Subcommand{
12651266
return gqlCursorId, true
12661267
}
12671268

1269+
fmt.Printf("%s\n", TwitchChatDownloaderCSVHeader);
12681270
gqlCursorId, ok := queryMessagesByOffset(*videoIdPtr, "")
12691271
if !ok {
12701272
return false

0 commit comments

Comments
 (0)