Documentation
¶
Index ¶
- Constants
- Variables
- func BulkDownload(list []string, output string) error
- func CalcDate(day string, baseTime time.Time) (time.Time, error)
- func ConcatAACFiles(ctx context.Context, input []string, resourcesDir string, output string) error
- func ConcatAACFilesAll(ctx context.Context, files []string, resourcesDir string, output string) error
- func ConcatAACFilesFromList(ctx context.Context, resourcesDir string) (string, error)
- func GenerateRss(title string, host string, image string, bucket string) (*podcast.Podcast, error)
- func HashFileMd5(filePath string) (string, error)
- func PutRss(rss *podcast.Podcast, bucket string, feedName string) error
- func RecAndUploadProgram(stationID string, start string, areaID string, bucket string, format string) error
- func RecCommandFactory() (cli.Command, error)
- func RecProgram(stationID string, start string, areaID string, format string) error
- func RecScheduleCommandFactory() (cli.Command, error)
- func RssCommandFactory() (cli.Command, error)
- func Version() string
- type Converter
- type ConverterM4A
- type ConverterMP3
- type MetaData
- type OutputConfig
- type S3
Constants ¶
View Source
const ( AudioFormatM4A = "m4a" AudioFormatMP3 = "mp3" )
Variables ¶
View Source
var Ui cli.Ui
Functions ¶
func BulkDownload ¶
func ConcatAACFiles ¶ added in v0.0.7
func ConcatAACFilesAll ¶ added in v0.0.7
func ConcatAACFilesAll(ctx context.Context, files []string, resourcesDir string, output string) error
ConcatAACFiles concatenate files of the same type.
func ConcatAACFilesFromList ¶ added in v0.0.7
ConcatAACFilesFromList concatenates files from the list of resources.
func GenerateRss ¶
func HashFileMd5 ¶
func RecAndUploadProgram ¶ added in v0.0.7
func RecCommandFactory ¶
func RecProgram ¶
func RecScheduleCommandFactory ¶ added in v0.0.5
func RssCommandFactory ¶
Types ¶
type Converter ¶ added in v0.0.7
func NewConverter ¶ added in v0.0.7
type ConverterM4A ¶ added in v0.0.7
type ConverterM4A struct { }
type ConverterMP3 ¶ added in v0.0.7
type ConverterMP3 struct { }
type MetaData ¶
type MetaData struct { StartAt time.Time `json:"start_at"` Title string `json:"title"` Desc string `json:"desc"` StartCode string `json:"start_code"` URL string `json:"url"` AudioFilename string `json:"audio_filename"` AudioSize int64 `json:"audio_size"` }
func NewMetadata ¶ added in v0.0.7
MetadataFromProg return metadata from prog
type OutputConfig ¶ added in v0.0.7
type OutputConfig struct { DirFullPath string FileBaseName string // base name of the file FileFormat string // m4a, mp3 }
OutputConfig contains the configuration for output files.
func NewOutputConfig ¶ added in v0.0.7
func NewOutputConfig(fileBaseName, fileFormat string) (*OutputConfig, error)
func (*OutputConfig) AbsPath ¶ added in v0.0.7
func (c *OutputConfig) AbsPath() string
func (*OutputConfig) AudioExt ¶ added in v0.0.7
func (c *OutputConfig) AudioExt() string
func (*OutputConfig) AudioFormat ¶ added in v0.0.7
func (c *OutputConfig) AudioFormat() string
func (*OutputConfig) IsExist ¶ added in v0.0.7
func (c *OutputConfig) IsExist() bool
func (*OutputConfig) SetupDir ¶ added in v0.0.7
func (c *OutputConfig) SetupDir() error
SetupDir configures the output directory or returns an error if failed to create it.
func (*OutputConfig) TempAACDir ¶ added in v0.0.7
func (c *OutputConfig) TempAACDir() (string, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.