Generate an RSS feed from a config file and an mp3 file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

117 lines
3.6 KiB

package objects
import "encoding/xml"
type Episode struct {
Title string `json:"title"`
Link string `json:"link"`
Description string `json:"description"`
Summary string `json:"summary"`
Explicit bool `json:"is_explicit"`
Duration string `json:"duration"`
Episode int `json:"episode"`
FileURL string `json:"file_url"`
Subtitle string `json:"subtitle"`
}
type Enclosure struct {
}
type Podcast struct {
Title string `yaml:"podcast_name"`
Link string `yaml:"podcast_link"`
Author string `yaml:"podcast_author"`
Language string `yaml:"podcast_language"`
IsExplicit bool `yaml:"podcast_is_explicit"`
Owner string `yaml:"podcast_owner"`
OwnerEmail string `yaml:"podcast_owner_email"`
Categories []string `yaml:"podcast_categories"`
Copyright string `yaml:"podcast_copyright"`
Type string `yaml:"podcast_type"`
Image string `yaml:"podcast_image"`
Description string `yaml:"podcast_description"`
Items string `yaml:"podcast_items"`
}
type RSSXML struct {
XMLName xml.Name `xml:"rss"`
Text string `xml:",chardata"`
Content string `xml:"content,attr"`
Wfw string `xml:"wfw,attr"`
Itunes string `xml:"itunes,attr"`
Dc string `xml:"dc,attr"`
Media string `xml:"media,attr"`
Version string `xml:"version,attr"`
Channel struct {
Text string `xml:",chardata"`
Title string `xml:"title"`
Link string `xml:"link"`
LastBuildDate string `xml:"lastBuildDate"`
Language string `xml:"language"`
Generator string `xml:"generator"`
Author string `xml:"author"`
Explicit string `xml:"explicit"`
Owner struct {
Text string `xml:",chardata"`
Name string `xml:"name"`
Email string `xml:"email"`
} `xml:"owner"`
Category []struct {
Text string `xml:",chardata"`
AttrText string `xml:"text,attr"`
Category struct {
Text string `xml:",chardata"`
AttrText string `xml:"text,attr"`
} `xml:"category"`
} `xml:"category"`
Copyright string `xml:"copyright"`
Type string `xml:"type"`
Image struct {
Text string `xml:",chardata"`
Href string `xml:"href,attr"`
} `xml:"image"`
Description string `xml:"description"`
Item []struct {
Text string `xml:",chardata"`
Title string `xml:"title"`
Creator string `xml:"creator"`
PubDate string `xml:"pubDate"`
Link string `xml:"link"`
Guid struct {
Text string `xml:",chardata"`
IsPermaLink string `xml:"isPermaLink,attr"`
} `xml:"guid"`
Description string `xml:"description"`
Author string `xml:"author"`
Summary string `xml:"summary"`
Explicit string `xml:"explicit"`
Duration string `xml:"duration"`
Image struct {
Text string `xml:",chardata"`
Href string `xml:"href,attr"`
} `xml:"image"`
Episode string `xml:"episode"`
EpisodeType string `xml:"episodeType"`
Enclosure struct {
Text string `xml:",chardata"`
URL string `xml:"url,attr"`
Length string `xml:"length,attr"`
Type string `xml:"type,attr"`
} `xml:"enclosure"`
Content struct {
Text string `xml:",chardata"`
URL string `xml:"url,attr"`
Length string `xml:"length,attr"`
Type string `xml:"type,attr"`
IsDefault string `xml:"isDefault,attr"`
Medium string `xml:"medium,attr"`
Title struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"title"`
} `xml:"content"`
Subtitle string `xml:"subtitle"`
} `xml:"item"`
} `xml:"channel"`
}