feed

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultFeedName = "feed.xml"
	DefaultShowName = "show.yaml"
)

Variables

This section is empty.

Functions

func Assemble added in v0.10.0

func Assemble(ctx context.Context, root string, force bool) error

Assemble collects all referenced podcast resources (.mp3, .gif, .png etc) and puts them into the local build location.

func Build

func Build(ctx context.Context, root string, validateOnly, buildOnly, generateMarkdown, purge bool) (string, error)

Build gathers all podcast resources and builds the feed.xml

func CreateEpisodeMarkdown added in v1.3.0

func CreateEpisodeMarkdown(root, target string, episode *podops.Episode) error

func Generate added in v1.3.0

func Generate(ctx context.Context, root, target string) error

Generate gathers all podcast episodes and builds the markdown assets needed to build a static site

func ImportResource added in v0.10.0

func ImportResource(ctx context.Context, parent, root string, encl *podops.AssetRef) error

ImportResource imports a resource from src and places it into the local build location

func LoadAssetRef added in v0.10.0

func LoadAssetRef(path string) (*podops.AssetRef, error)

func MoveResource added in v0.10.0

func MoveResource(ctx context.Context, src, target string) error

func ParseDuration added in v0.10.0

func ParseDuration(duration int64) string

ParseDuration converts seconds duration into HH:MM:SS format

func ResolveResource added in v0.10.0

func ResolveResource(ctx context.Context, parent, root string, force bool, encl *podops.AssetRef) error

ResolveResource imports or moves a resource into the local build location

func ValidateResource added in v0.10.0

func ValidateResource(ctx context.Context, parent, root string, encl *podops.AssetRef) error

ValidateResource validates the existens of a local or remote resource

Types

type EpisodeList

type EpisodeList []*podops.Episode

EpisodeList holds the list of valid episodes that will be added to a podcast

func (EpisodeList) Len

func (e EpisodeList) Len() int

func (EpisodeList) Less

func (e EpisodeList) Less(i, j int) bool

func (EpisodeList) Swap

func (e EpisodeList) Swap(i, j int)

type PodcastEpisode added in v1.3.0

type PodcastEpisode struct {
	MP3         string       `json:"mp3" yaml:"mp3"`
	Duration    string       `json:"duration" yaml:"duration"`
	Image       PodcastImage `json:"image" yaml:"image"`
	Episode     string       `json:"episode" yaml:"episode"`
	EpisodeType string       `json:"episodeType" yaml:"episodeType"`
	Season      string       `json:"season" yaml:"season"`
	Explicit    string       `json:"explicit" yaml:"explicit"`
	Block       string       `json:"bock" yaml:"block"`
}

type PodcastEpisodeFrontmatter added in v1.3.0

type PodcastEpisodeFrontmatter struct {
	Title   string         `json:"title" yaml:"title"`
	Slug    string         `json:"slug" yaml:"slug"`
	Date    string         `json:"date" yaml:"date"`
	Podcast PodcastEpisode `json:"podcast" yaml:"podcast"`
}

type PodcastImage added in v1.3.0

type PodcastImage struct {
	URI     string `json:"src" yaml:"src"`
	AltText string `json:"alt" yaml:"alt"`
}

Jump to

Keyboard shortcuts

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