Skip to content

Commit 9c4388f

Browse files
committed
Remove chapter length bars from summary
There are mostly useless
1 parent d0eebbf commit 9c4388f

1 file changed

Lines changed: 2 additions & 29 deletions

File tree

markut.go

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -310,36 +310,9 @@ func (context EvalContext) PrintSummary() error {
310310
}
311311
fmt.Println()
312312
fmt.Printf(">>> YouTube Chapters (%d):\n", len(context.chapters))
313-
maxLength := Millis(0);
314-
for i, chapter := range context.chapters {
315-
var length Millis;
316-
if i + 1 < len(context.chapters) {
317-
length = context.chapters[i + 1].Timestamp;
318-
} else {
319-
length = fullLength;
320-
}
321-
length -= chapter.Timestamp;
322-
maxLength = max(maxLength, length)
323-
}
324313
locWidth = MaxChaptersLocWidthPlusOne(context.chapters)
325-
for i, chapter := range context.chapters {
326-
var length Millis;
327-
if i + 1 < len(context.chapters) {
328-
length = context.chapters[i + 1].Timestamp;
329-
} else {
330-
length = fullLength;
331-
}
332-
length -= chapter.Timestamp;
333-
barMax := int64(18);
334-
barCur := barMax*int64(length)/int64(maxLength)
335-
bar := strings.Builder{}
336-
for i := int64(0); i < barCur; i += 1 {
337-
bar.WriteString("#");
338-
}
339-
for i := barCur; i < barMax; i += 1 {
340-
bar.WriteString(".");
341-
}
342-
fmt.Printf("%-*s [%s] %s - %s\n", locWidth, chapter.Loc.String() + ":", bar.String(), millisToYouTubeTs(chapter.Timestamp), chapter.Label)
314+
for _, chapter := range context.chapters {
315+
fmt.Printf("%-*s - %s - %s\n", locWidth, chapter.Loc.String() + ":", millisToYouTubeTs(chapter.Timestamp), chapter.Label)
343316
}
344317
fmt.Println()
345318
fmt.Printf(">>> Length:\n")

0 commit comments

Comments
 (0)