26 lines
667 B
Go
Raw Permalink Normal View History

2018-04-04 11:37:04 +00:00
package main
func main() {
2018-04-08 09:33:37 +00:00
// color.Yellow("Generating anime IDs")
2018-04-04 11:37:04 +00:00
2018-04-08 09:33:37 +00:00
// defer color.Green("Finished")
// defer arn.Node.Close()
2018-04-04 11:37:04 +00:00
2018-04-08 09:33:37 +00:00
// allAnime := arn.FilterAnime(func(anime *arn.Anime) bool {
// return len(anime.ID) < len("hw5heOmiR")
// })
2018-04-04 11:37:04 +00:00
2018-04-08 09:33:37 +00:00
// sort.Slice(allAnime, func(i, j int) bool {
// aID, _ := strconv.Atoi(allAnime[i].ID)
// bID, _ := strconv.Atoi(allAnime[j].ID)
2018-04-04 11:37:04 +00:00
2018-04-08 09:33:37 +00:00
// return aID < bID
// })
2018-04-04 11:37:04 +00:00
2018-04-08 09:33:37 +00:00
// for counter, anime := range allAnime {
// newID := arn.GenerateID("Anime")
// fmt.Printf("[%d / %d] Old [%s] New [%s] %s\n", counter+1, len(allAnime), color.YellowString(anime.ID), color.GreenString(newID), anime)
// anime.SetID(newID)
// }
2018-04-04 11:37:04 +00:00
}