Documentation
¶
Overview ¶
Package eyecandy read/write SSA/ASS Subtitle Script
Index ¶
- Constants
- func GetSyls(text string) [][]string
- func NewDialog(text string) *writer.Dialog
- func NewStyle(name string) *writer.Style
- func StripSSATags(text string) string
- func StripSSATagsNotKDur(text string) string
- type Char
- type Dialog
- type Line
- type Script
- func (fx *Script) Add(dialog interface{})
- func (fx *Script) AddStyle(sty *writer.Style)
- func (fx *Script) CopyChar(dialog *Char) Char
- func (fx *Script) CopyLine(dialog *Line) Line
- func (fx *Script) CopySyl(dialog *Syl) Syl
- func (fx *Script) GetStyle(name string) (*reader.Style, bool)
- func (fx *Script) Lines() (dialogs []*Line)
- func (fx *Script) Save(fn string)
- func (fx *Script) Styles() map[string]*reader.Style
- type Syl
Constants ¶
View Source
const ( // AlignBottomLeft Bottom Left SSA numbered Alignment AlignBottomLeft int = 1 + iota // AlignBottomCenter Bottom Center SSA numbered Alignment AlignBottomCenter // AlignBottomRight Bottom Right SSA numbered Alignment AlignBottomRight // AlignMiddleLeft Middle Left SSA numbered Alignment AlignMiddleLeft // AlignMiddleCenter Middle Center SSA numbered Alignment AlignMiddleCenter // AlignMiddleRight Middle Right SSA numbered Alignment AlignMiddleRight // AlignTopLeft Top Left SSA numbered Alignment AlignTopLeft // AlignTopCenter Top Left SSA numbered Alignment AlignTopCenter // AlignTopRight Top Right SSA numbered Alignment AlignTopRight )
Variables ¶
This section is empty.
Functions ¶
func StripSSATags ¶
func StripSSATagsNotKDur ¶
Types ¶
type Char ¶
type Char struct {
Dialog
Inline string
SylStartTime int
SylEndTime int
SylMidEndTime int
SylDuration int
}
Char Represent the subtitle"s lines.
type Dialog ¶
type Dialog struct {
Layer int
StartTime int
EndTime int
StyleName string
Actor string
Effect string
Text string
Tags string
Duration int
MidTime int
Style *reader.Style
Comment bool
Width float64
Height float64
Size [2]float64
XFix float64
X float64
Y float64
Top float64
Middle float64
Bottom float64
Left float64
Center float64
Right float64
}
type Line ¶
type Line struct {
Dialog
Kara string
SylN int
CharN int
// contains filtered or unexported fields
}
Line Represent the subtitle"s lines.
type Script ¶
type Script struct {
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
LineN int
Shift int
XFix float64
// contains filtered or unexported fields
}
Script represent the SSA Script
func (*Script) Add ¶
func (fx *Script) Add(dialog interface{})
Add append a Dialog (Syl, Char, Line) to Script
Directories
¶
| Path | Synopsis |
|---|---|
|
Package asstags Package asstags
|
Package asstags Package asstags |
|
Package asstime provide time conversions an framerate functions
|
Package asstime provide time conversions an framerate functions |
|
cmd
|
|
|
demo
command
|
|
|
Package color provides color convention and useful functions Package color provides color convention and useful functions Package color provides color convention and useful functions
|
Package color provides color convention and useful functions Package color provides color convention and useful functions Package color provides color convention and useful functions |
|
Package draw
|
Package draw |
|
Package interpolate Simple interpolation
|
Package interpolate Simple interpolation |
|
Package reader read an SSA/ASS Subtitle Script
|
Package reader read an SSA/ASS Subtitle Script |
|
Package utils provide some helpers functions for other packages
|
Package utils provide some helpers functions for other packages |
|
Package writer create SSA/ASS Subtitle Script
|
Package writer create SSA/ASS Subtitle Script |
|
Package writer create SSA/ASS Subtitle Script
|
Package writer create SSA/ASS Subtitle Script |
Click to show internal directories.
Click to hide internal directories.