Documentation ¶
Index ¶
- func AnimeDetailsCheck(aid string, runningConfig *env.Config)
- func AnimeDetailsGet(aid string, runningconfig *env.Config)
- func AnimeTitleCompare(animetitle AnimeTitle, animename string, animelang string) bool
- func AnimeTitlesCheck(RunningConfig *env.Config)
- func AnimeTitlesGet(savelocation string)
- type Anime
- type AnimeDetails
- type AnimeTitle
- type AnimeTitleSearchResults
- type AnimeTitles
- type Episode
- type Episodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnimeDetailsCheck ¶
AnimeDetailsCheck checks to see if the xml file for each AID from AniDB has been downloaded in the last 24 hours. AnimeTitlesCheck will download the xml if the file is older than 24 hours or has not been downloaded.
func AnimeDetailsGet ¶
AnimeTitlesGet downloades the anime-titles.xml file from AniDB.
func AnimeTitleCompare ¶
func AnimeTitleCompare(animetitle AnimeTitle, animename string, animelang string) bool
func AnimeTitlesCheck ¶
AnimeTitlesCheck checks to see if the anime-titles.xml file from AniDB has been downloaded in the last 24 hours. AnimeTitlesCheck will download anime-titles.xml if the file is older than 24 hours or has not been downloaded.
func AnimeTitlesGet ¶
func AnimeTitlesGet(savelocation string)
AnimeTitlesGet downloades the anime-titles.xml file from AniDB.
Types ¶
type Anime ¶
type Anime struct { Aid int `xml:"aid,attr"` //from anime-titles.xml Title []AnimeTitle `xml:"title"` //from anime-titles.xml }
Anime is the struct for the anime level of anime-titles.xml
type AnimeDetails ¶
type AnimeDetails struct { Aid int `xml:"id,attr"` Episodes Episodes `xml:"episodes"` EpisodeCount int `xml:"episodecount"` StartDate string `xml:"startdate"` EndDate string `xml:"enddate"` Description string `xml:"description"` }
func AnimeDetailsParse ¶
func AnimeDetailsParse(xmlFilestring string) AnimeDetails
AnimeParse takes anime-titles.xml and produces an AnimeTitles struct with all revelent information
type AnimeTitle ¶
type AnimeTitle struct { Name string `xml:",chardata"` //from anime-titles.xml AnimeType string `xml:"type,attr"` //from anime-titles.xml Lang string `xml:"lang,attr"` //from anime-titles.xml }
AnimeTitle is the struct for the title lines of anime-titles.xml
type AnimeTitleSearchResults ¶
type AnimeTitleSearchResults struct { Name string Aid string EpName string Epno string Airdate string Status string Lang string Quality string }
AnimeTitleSearchResults is the struct for Anime title search results.
func AnimeSearch ¶
func AnimeSearch(animeTitlesStruct AnimeTitles, animename string, animelang string) []AnimeTitleSearchResults
AnimeSearch will seach an AnimeTitles struct for an anime name and language. It will return the aid number(s) and anime name(s) from the AnimeTitles struct.
func AnimeSearchWrapper ¶
func AnimeSearchWrapper(RunningConfig *env.Config, animename string, animelang string) []AnimeTitleSearchResults
type AnimeTitles ¶
type AnimeTitles struct {
AnimeList []Anime `xml:"anime"` //from anime-titles.xml
}
AnimeTitles is the struct for the top level of anime-titles.xml
func AnimeParse ¶
func AnimeParse(xmlFilestring string) AnimeTitles
AnimeParse takes anime-titles.xml and produces an AnimeTitles struct with all revelent information