reader

package
v0.0.0-...-c131409 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package reader read an SSA/ASS Subtitle Script

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialogCollection

type DialogCollection []*dialog

DialogCollection collection of Dialog's in a SSA/ASS Script

func (DialogCollection) Commented

func (dlgs DialogCollection) Commented() DialogCollection

Commented list only the commented dialog's in a SSA/ASS Script

func (DialogCollection) NotCommented

func (dlgs DialogCollection) NotCommented() DialogCollection

NotCommented list only the not commented dialog's in a SSA/ASS Script

type Script

type Script struct {
	Dialog             DialogCollection
	Style              map[string]*Style
	StyleUsed          map[string]*Style
	Resolution         [2]int // WIDTH, HEIGHT
	VideoPath          string
	VideoZoom          float64
	VideoPosition      int
	VideoAR            float64
	MetaFilename       string
	MetaTitle          string
	MetaOriginalScript string
	MetaTranslation    string
	MetaTiming         string
	Audio              string
}

Script SSA/ASS Subtitle Script.

func Read

func Read(fn string) *Script

Read parse and read an SSA/ASS Subtitle Script.

type Style

type Style struct {
	Name      string
	FontName  string
	FontSize  int
	Color     [4]*color.Color //Primary, Secondary, Bord, Shadow
	Bold      bool
	Italic    bool
	Underline bool
	StrikeOut bool
	Scale     [2]float64 // WIDTH, HEIGHT
	Spacing   float64
	Angle     int
	OpaqueBox bool
	Bord      float64
	Shadow    float64
	Alignment int
	Margin    [3]int // L, R, V
	Encoding  int
}

Style represent Subtitle Style.

func NewStyle

func NewStyle(name string) *Style

NewStyle create a new Style Struct with defaults

Jump to

Keyboard shortcuts

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