Documentation
¶
Index ¶
- func ExtractFFmeta(input string) *ffmpeg.Cmd
- func FindFilesByExt(ext, dir string) []file.File
- func InitConfig(v *viper.Viper)
- func TmpFile(d []byte) string
- func Write(file *os.File, data []byte) *os.File
- func WriteFile(name, ext string, data []byte) string
- type ArgFlag
- type BoolFlag
- type Cmd
- func (c *Cmd) Add(cmd Command) *Cmd
- func (c *Cmd) Bin(bin string) *Cmd
- func (c Cmd) Build() (*exec.Cmd, error)
- func (c *Cmd) Command(bin string, args []string) *Cmd
- func (c *Cmd) FFmpeg() *ffmpeg.Cmd
- func (c Cmd) HasChapNo() bool
- func (c Cmd) HasCover() bool
- func (c Cmd) HasCue() bool
- func (c Cmd) HasEnd() bool
- func (c Cmd) HasInput() bool
- func (c Cmd) HasMeta() bool
- func (c Cmd) HasOutput() bool
- func (c Cmd) HasStart() bool
- func (cmd *Cmd) MkTmp() *os.File
- func (c Cmd) ParseArgs() ([]string, error)
- func (c *Cmd) ParseFlags(f Flag) *Cmd
- func (c Cmd) Run() ([]byte, error)
- func (c Cmd) RunBatch() []byte
- func (c *Cmd) SetArgs(args ...string) *Cmd
- func (c *Cmd) SetChapFlag() *Cmd
- func (c *Cmd) SetCover(f string) *Cmd
- func (c *Cmd) SetCoverFlag() *Cmd
- func (c *Cmd) SetCue(f string) *Cmd
- func (c *Cmd) SetCueFlag() *Cmd
- func (c *Cmd) SetInput(i string) *Cmd
- func (c *Cmd) SetMeta(f string) *Cmd
- func (c *Cmd) SetMetaFlag() *Cmd
- func (c *Cmd) SetOutput(o string) *Cmd
- func (c Cmd) String() string
- func (c *Cmd) Verbose() *Cmd
- type Command
- type Config
- type CutCmd
- type Defaults
- type ExtractCmd
- type Flag
- type JoinCmd
- type Media
- func (m *Media) AddFile(name, path string) *Media
- func (m Media) AudioCodec() string
- func (m Media) DumpJson() []byte
- func (m Media) EachChapter() []*chap.Chapter
- func (m Media) EmbeddedCoverExt() string
- func (m Media) HasCue() bool
- func (m Media) HasEmbeddedCover() bool
- func (m Media) HasFFmeta() bool
- func (m *Media) ReadCueSheet() chap.Chapters
- func (m *Media) ReadEmbeddedMeta() *ffmeta.Meta
- func (m *Media) ReadFFmeta() *ffmeta.Meta
- func (m *Media) SetCue(c string) *Media
- func (m *Media) SetFFmeta(ff string) *Media
- func (m *Media) SetMeta() *Media
- type MediaFile
- type Output
- type Profile
- type RelatedFiles
- type RmCmd
- type SplitCmd
- type UpdateCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFFmeta ¶
func FindFilesByExt ¶
func InitConfig ¶
Types ¶
type Cmd ¶
type Cmd struct {
Profile Profile
Start string
End string
Output file.File
Input file.File
Cover file.File
Meta file.File
Cue file.File
Media *Media
Num int
PadOutput bool
Padding string
ChapNo int
Batch []Command
// contains filtered or unexported fields
}
func (*Cmd) ParseFlags ¶
func (*Cmd) SetChapFlag ¶
func (*Cmd) SetCoverFlag ¶
func (*Cmd) SetCueFlag ¶
func (*Cmd) SetMetaFlag ¶
type Config ¶
type Config struct {
Defaults Defaults `mapstructure:"default"`
Profiles map[string]Profile `toml:"profile",mapstructure:"profiles"`
}
func (Config) GetProfile ¶
func (Config) ListProfiles ¶
type Defaults ¶
func (Defaults) HasLogLevel ¶
func (Defaults) HasPadding ¶
func (Defaults) HasProfile ¶
type ExtractCmd ¶
type ExtractCmd struct {
*Cmd
}
func Extract ¶
func Extract() *ExtractCmd
func (*ExtractCmd) Parse ¶
func (e *ExtractCmd) Parse() *Cmd
type JoinCmd ¶
type JoinCmd struct {
*Cmd
// contains filtered or unexported fields
}
func (JoinCmd) CalculateChapters ¶
type Media ¶
type Media struct {
Input MediaFile
Files RelatedFiles
*ffmeta.Meta
// contains filtered or unexported fields
}
func (Media) AudioCodec ¶
func (Media) EachChapter ¶
func (Media) EmbeddedCoverExt ¶
func (Media) HasEmbeddedCover ¶
func (*Media) ReadCueSheet ¶
func (*Media) ReadEmbeddedMeta ¶
func (*Media) ReadFFmeta ¶
type MediaFile ¶
func (MediaFile) IsPlainText ¶
type Profile ¶
type RelatedFiles ¶
func (RelatedFiles) Get ¶
func (r RelatedFiles) Get(name string) MediaFile
func (RelatedFiles) Has ¶
func (r RelatedFiles) Has(name string) bool
Click to show internal directories.
Click to hide internal directories.