Documentation ¶
Index ¶
- func Build(cfg *Config, episodes []*Episode, rootDir, generator, destination string, ...) error
- func IsSupportedMediaExt(ext string) bool
- func LoadEpisode(rootDir, audioFile, body string, ignoreMissing, saveMeta bool, ...) (string, bool, error)
- func NewMarkdown() goldmark.Markdown
- func Scaffold(outDir string) error
- type Audio
- type Builder
- type Categories
- type ChannelConfig
- type Chapter
- type Config
- type Episode
- type EpisodeFrontMatter
- type Feed
- type MediaType
- type Page
- type PageArg
- type PageInfo
- type YAMLLang
- type YAMLURL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSupportedMediaExt ¶
func LoadEpisode ¶
func LoadEpisode( rootDir, audioFile, body string, ignoreMissing, saveMeta bool, pubDate time.Time, slug, title, subtitle string, loc *time.Location) (string, bool, error)
The `audioFile` is specified either by file path, filename in the audio placement directory or URL. This means there are follwing patterns for `audioFile`:
- File path:
- Relative path: "./audio/1.mp3" (this will be relative to the current directory, not the rootDir)
- Absolute path: "/path/to/audio/mp.3"
- File name: "1.mp3" (subdirectories are currently not supported) - URL: "https://example.com/audio/1.mp3"
In any case, the audio files must exist under the audio placement directory.
func NewMarkdown ¶
Types ¶
type Audio ¶
type Builder ¶
type Builder struct { Config *Config Episodes []*Episode RootDir string Generator string BuildDir string BuildDate time.Time // contains filtered or unexported fields }
func NewBuilder ¶ added in v0.0.6
type Categories ¶
type Categories []string
func (*Categories) UnmarshalYAML ¶
func (cats *Categories) UnmarshalYAML(unmarshal func(interface{}) error) error
type ChannelConfig ¶
type ChannelConfig struct { Link YAMLURL `yaml:"link"` Title string `yaml:"title"` Description string `yaml:"description"` Categories Categories `yaml:"category"` // XXX sub category is not supported yet Language YAMLLang `yaml:"language"` Author string `yaml:"author"` Email string `yaml:"email"` Artwork string `yaml:"artwork"` Copyright string `yaml:"copyright"` Explicit bool `yaml:"explicit"` Private bool `yaml:"private"` }
func (*ChannelConfig) FeedURL ¶
func (channel *ChannelConfig) FeedURL() *url.URL
func (*ChannelConfig) ImageURL ¶
func (channel *ChannelConfig) ImageURL() string
type Chapter ¶ added in v0.0.8
func (*Chapter) MarshalYAML ¶ added in v0.0.13
func (*Chapter) UnmarshalYAML ¶ added in v0.0.13
type Config ¶
type Config struct { Channel *ChannelConfig `yaml:"channel"` TimeZone string `yaml:"timezone"` AudioBucketURL YAMLURL `yaml:"audio_bucket_url"` // contains filtered or unexported fields }
func LoadConfig ¶
func (*Config) AudioBaseURL ¶
type Episode ¶
type Episode struct { EpisodeFrontMatter Slug string RawBody, Body string URL *url.URL ChaptersBody string // contains filtered or unexported fields }
func LoadEpisodes ¶
type EpisodeFrontMatter ¶
type EpisodeFrontMatter struct { AudioFile string `yaml:"audio"` Title string `yaml:"title"` Date string `yaml:"date"` Subtitle string `yaml:"subtitle"` Chapters []*Chapter `yaml:"chapters,omitempty"` // contains filtered or unexported fields }
func (*EpisodeFrontMatter) Audio ¶
func (epm *EpisodeFrontMatter) Audio() *Audio
func (*EpisodeFrontMatter) PubDate ¶
func (epm *EpisodeFrontMatter) PubDate() time.Time
type Feed ¶
type Feed struct { Channel *ChannelConfig Podcast *podcast.Podcast }
type PageArg ¶ added in v0.0.14
type PageArg struct { Page *PageInfo Body template.HTML Episodes []*Episode Channel *ChannelConfig }
Click to show internal directories.
Click to hide internal directories.