29 lines
573 B
Go
Raw Normal View History

2017-10-16 23:54:54 +00:00
package main
import (
"fmt"
2018-03-07 23:12:22 +00:00
"sort"
2017-10-16 23:54:54 +00:00
2019-06-03 09:32:43 +00:00
"github.com/animenotifier/notify.moe/arn"
2017-10-16 23:54:54 +00:00
)
func main() {
2018-03-07 23:12:22 +00:00
list := []*arn.Anime{}
2017-10-28 02:54:24 +00:00
for anime := range arn.StreamAnime() {
2018-03-13 15:45:40 +00:00
if anime.Status != "current" || anime.Type != "tv" || anime.StartDate == "" || anime.StartDate < "2017-12" || anime.StartDate > "2018-02-01" {
2017-10-16 23:54:54 +00:00
continue
}
2018-03-07 23:12:22 +00:00
list = append(list, anime)
}
sort.Slice(list, func(i, j int) bool {
return list[i].Popularity.Total() > list[j].Popularity.Total()
})
for _, anime := range list {
2017-10-16 23:54:54 +00:00
fmt.Printf("* [%s](/anime/%s)\n", anime.Title.Canonical, anime.ID)
}
}