Documentation
¶
Overview ¶
Package epg provides Electronic Program Guide (EPG) functionality including fuzzy matching and XMLTV generation.
Package epg provides Electronic Program Guide (EPG) functionality including fuzzy matching and XMLTV generation.
Package epg provides Electronic Program Guide (EPG) functionality including fuzzy matching and XMLTV generation.
Package epg provides Electronic Program Guide (EPG) functionality including fuzzy matching and XMLTV generation.
Package epg provides Electronic Program Guide functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNameToIDMap ¶
BuildNameToIDMap reads an XMLTV file and returns a map[nameKey]=channelID. It expects elements matching the `Channel` type defined in generator.go.
func FindBest ¶
FindBest finds the best matching channel name using fuzzy string matching. It performs exact or fuzzy matching (Levenshtein) up to maxDist.
func WriteXMLTV ¶
WriteXMLTV writes XMLTV data to a file atomically using temp file + rename.
Types ¶
type Channel ¶
type Channel struct {
ID string `xml:"id,attr"`
DisplayName []string `xml:"display-name"`
Icon *Icon `xml:"icon,omitempty"`
}
Channel represents an XMLTV channel with its metadata.
type Icon ¶
type Icon struct {
Src string `xml:"src,attr"`
}
Icon represents a channel icon in XMLTV format.
type Programme ¶
type Programme struct {
Start string `xml:"start,attr"`
Stop string `xml:"stop,attr"`
Channel string `xml:"channel,attr"`
Title Title `xml:"title"`
Desc string `xml:"desc,omitempty"`
}
Programme represents a TV programme in XMLTV format.
type TV ¶
type TV struct {
XMLName xml.Name `xml:"tv"`
Generator string `xml:"generator-info-name,attr,omitempty"`
GeneratorURL string `xml:"generator-info-url,attr,omitempty"`
Channels []Channel `xml:"channel"`
Programs []Programme `xml:"programme"`
}
TV represents the root XMLTV document structure.
func GenerateXMLTV ¶
GenerateXMLTV generates an XMLTV document from channel and EPG data.