eyecandy

package module
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: 9 Imported by: 1

README

eyecandy Go Report Card MIT Licence

ASS(Advanced SubStation Alpha) karaoke effect generator (http://www.aegisub.org/)

Generated Docs GoDoc

https://gowalker.org/github.com/Alquimista/eyecandy https://godoc.org/github.com/Alquimista/eyecandy

Rewrite of Eyecandy (Python)

https://github.com/Alquimista/Eyecandy-py

Documentation

Overview

Package eyecandy read/write SSA/ASS Subtitle Script

Index

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 GetSyls

func GetSyls(text string) [][]string

func NewDialog

func NewDialog(text string) *writer.Dialog

NewDialog create a new Dialog

func NewStyle

func NewStyle(name string) *writer.Style

NewStyle create a new Style

func StripSSATags

func StripSSATags(text string) string

func StripSSATagsNotKDur

func StripSSATagsNotKDur(text string) string

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.

func (*Line) Chars

func (d *Line) Chars() (chars []*Char)

Chars list all characters in a Line

func (*Line) Syls

func (d *Line) Syls() (syls []*Syl)

Syls list all syllables in a Line

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 NewEffect

func NewEffect(inFN string) *Script

NewEffect create a new script

func (*Script) Add

func (fx *Script) Add(dialog interface{})

Add append a Dialog (Syl, Char, Line) to Script

func (*Script) AddStyle

func (fx *Script) AddStyle(sty *writer.Style)

AddStyle append a Style to Script

func (*Script) CopyChar

func (fx *Script) CopyChar(dialog *Char) Char

CopyChar create a copy of the current Char

func (*Script) CopyLine

func (fx *Script) CopyLine(dialog *Line) Line

CopyLine create a copy of the current Line

func (*Script) CopySyl

func (fx *Script) CopySyl(dialog *Syl) Syl

CopySyl create a copy of the current Syl

func (*Script) GetStyle

func (fx *Script) GetStyle(name string) (*reader.Style, bool)

GetStyle get a style corresponding to name provided

func (*Script) Lines

func (fx *Script) Lines() (dialogs []*Line)

Lines List all the lines in a Script

func (*Script) Save

func (fx *Script) Save(fn string)

Save create the final script file (.ass)

func (*Script) Styles

func (fx *Script) Styles() map[string]*reader.Style

Styles list styles use the Script

type Syl

type Syl struct {
	Dialog
	Inline string
}

Syl Represent the subtitle"s lines.

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
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

Jump to

Keyboard shortcuts

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