parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SamiStateInit      = 0
	SamiStateSyncStart = 1
	SamiStateText      = 2
	SamiStateSyncEnd   = 3
	SamiStateForceQuit = 99
)

Variables

This section is empty.

Functions

func GetParserFormat

func GetParserFormat(filename string) string

func ReadSubFromFile

func ReadSubFromFile(readFileName string) (*subtitle.Subtitle, error)

func WriteSubToFile

func WriteSubToFile(writeFileName string, inSt subtitle.Subtitle) error

Types

type ReadFunc

type ReadFunc func(string) (subtitle.Subtitle, error)

func GetParserReader

func GetParserReader(formatName string) ReadFunc

type SamiFormat

type SamiFormat struct {
	TypeName string
}

func (*SamiFormat) Read

func (sr *SamiFormat) Read(inputData string) (subtitle.Subtitle, error)

func (*SamiFormat) Write

func (sr *SamiFormat) Write(insub subtitle.Subtitle) (string, error)

type SamiStateType

type SamiStateType int

type SubripFormat

type SubripFormat struct {
	TypeName string
}

func (*SubripFormat) Read

func (sr *SubripFormat) Read(inputData string) (subtitle.Subtitle, error)

func (*SubripFormat) Write

func (sr *SubripFormat) Write(insub subtitle.Subtitle) (string, error)

type WriteFunc

type WriteFunc func(subtitle.Subtitle) (string, error)

func GetParserWriter

func GetParserWriter(formatName string) WriteFunc

Jump to

Keyboard shortcuts

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