webvtt

package
v0.0.0-...-920bcd1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStyles

func GetStyles(speakers []string) string

GetStyles returns styles section for speakers

func Header(str string) string

Header constructs WebVTT header

func WriteLineTo

func WriteLineTo(sb *strings.Builder, line *Line, speaker string)

WriteLineTo writes line to result builder with speaker

func WriteTo

func WriteTo(sb *strings.Builder, lines []*Line)

WriteTo writes lines to result builder

Types

type Line

type Line struct {
	Speaker string

	From time.Duration
	// contains filtered or unexported fields
}

Line for webvtt line

func Extract

func Extract(data []*lattice.Part) []*Line

Extract get line slice from lattice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL