From e70dc0daed564fa63022fa886fa8c3277f7beb5e Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 1 Nov 2017 19:27:04 +0100 Subject: [PATCH] Minor changes --- pages/editor/anilist.pixy | 2 +- pages/editor/shoboi.pixy | 2 +- patches/add-anime-lists/add-anime-lists.go | 39 ---------------------- 3 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 patches/add-anime-lists/add-anime-lists.go diff --git a/pages/editor/anilist.pixy b/pages/editor/anilist.pixy index d27b6086..be296eca 100644 --- a/pages/editor/anilist.pixy +++ b/pages/editor/anilist.pixy @@ -13,7 +13,7 @@ component AniListMissingMapping(missing []*arn.Anime) th Tools tbody each anime in missing - tr + tr.mountable td= anime.Popularity.Total() td a(href=anime.Link(), target="_blank", rel="noopener")= anime.Title.Canonical diff --git a/pages/editor/shoboi.pixy b/pages/editor/shoboi.pixy index 8dd2aca0..9783b645 100644 --- a/pages/editor/shoboi.pixy +++ b/pages/editor/shoboi.pixy @@ -13,7 +13,7 @@ component ShoboiMissingMapping(missing []*arn.Anime) th Tools tbody each anime in missing - tr + tr.mountable td= anime.Popularity.Total() td a(href=anime.Link(), target="_blank", rel="noopener")= anime.Title.Canonical diff --git a/patches/add-anime-lists/add-anime-lists.go b/patches/add-anime-lists/add-anime-lists.go deleted file mode 100644 index 88776a6f..00000000 --- a/patches/add-anime-lists/add-anime-lists.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/animenotifier/arn" - "github.com/fatih/color" -) - -func main() { - color.Yellow("Adding empty anime lists to users who don't have one") - - // Get a stream of all users - allUsers, err := arn.StreamUsers() - - if err != nil { - panic(err) - } - - // Iterate over the stream - for user := range allUsers { - exists, err := arn.DB.Exists("AnimeList", user.ID) - - if err == nil && !exists { - fmt.Println(user.Nick) - - err := arn.DB.Set("AnimeList", user.ID, &arn.AnimeList{ - UserID: user.ID, - Items: make([]*arn.AnimeListItem, 0), - }) - - if err != nil { - color.Red(err.Error()) - } - } - } - - color.Green("Finished.") -}