diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 10:57:27 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 10:57:27 +0530 |
commit | fff3dadabc321871e6819392efc605c6dffe2e69 (patch) | |
tree | 25aceed23b73b2ad975a06d73fad091d0886a2a6 /cmd | |
parent | a44d6eb2fdddc75983c735e1a0fa744014db9593 (diff) |
migrated from MAL2Go to mg package
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/chapters.go | 10 | ||||
-rw-r--r-- | cmd/episodes.go | 10 | ||||
-rw-r--r-- | cmd/list.go | 6 | ||||
-rw-r--r-- | cmd/login.go | 2 | ||||
-rw-r--r-- | cmd/logout.go | 2 | ||||
-rw-r--r-- | cmd/root.go | 2 | ||||
-rw-r--r-- | cmd/score.go | 14 | ||||
-rw-r--r-- | cmd/search.go | 14 | ||||
-rw-r--r-- | cmd/status.go | 14 | ||||
-rw-r--r-- | cmd/user_info.go | 2 | ||||
-rw-r--r-- | cmd/volumes.go | 11 |
11 files changed, 40 insertions, 47 deletions
diff --git a/cmd/chapters.go b/cmd/chapters.go index d65d270..38d3a3e 100644 --- a/cmd/chapters.go +++ b/cmd/chapters.go @@ -22,10 +22,10 @@ import ( "os" "fmt" "strings" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/util" - "github.com/MikunoNaka/macli/mal" - m "github.com/MikunoNaka/MAL2Go/v4/manga" + "vidhukant.com/macli/ui" + "vidhukant.com/macli/util" + "vidhukant.com/macli/mal" + "vidhukant.com/mg" "github.com/spf13/cobra" ) @@ -55,7 +55,7 @@ var chaptersCmd = &cobra.Command{ ui.PromptLength = conf.PromptLength mal.Init() - var selectedManga m.Manga + var selectedManga mg.Manga if entryId > 0 { selectedManga = mal.GetMangaData(entryId, []string{"my_list_status", "num_chapters"}) } diff --git a/cmd/episodes.go b/cmd/episodes.go index 57dbba5..55e177d 100644 --- a/cmd/episodes.go +++ b/cmd/episodes.go @@ -22,10 +22,10 @@ import ( "os" "fmt" "strings" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/util" - "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v4/anime" + "vidhukant.com/macli/ui" + "vidhukant.com/macli/util" + "vidhukant.com/macli/mal" + "vidhukant.com/mg" "github.com/spf13/cobra" ) @@ -55,7 +55,7 @@ var episodesCmd = &cobra.Command{ ui.PromptLength = conf.PromptLength mal.Init() - var selectedAnime a.Anime + var selectedAnime mg.Anime if entryId > 0 { selectedAnime = mal.GetAnimeData(entryId, []string{"my_list_status", "num_episodes"}) } diff --git a/cmd/list.go b/cmd/list.go index 4a8cf38..cd6fcaf 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -21,9 +21,9 @@ package cmd import ( "os" "fmt" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/util" - "github.com/MikunoNaka/macli/mal" + "vidhukant.com/macli/ui" + "vidhukant.com/macli/util" + "vidhukant.com/macli/mal" "github.com/spf13/cobra" ) diff --git a/cmd/login.go b/cmd/login.go index cbb0955..59da497 100644 --- a/cmd/login.go +++ b/cmd/login.go @@ -20,7 +20,7 @@ package cmd import ( "fmt" - "github.com/MikunoNaka/macli/auth" + "vidhukant.com/macli/auth" "github.com/spf13/cobra" "github.com/spf13/viper" "os" diff --git a/cmd/logout.go b/cmd/logout.go index 0826782..1ae9f3e 100644 --- a/cmd/logout.go +++ b/cmd/logout.go @@ -20,7 +20,7 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/MikunoNaka/macli/auth" + "vidhukant.com/macli/auth" ) var logoutCmd = &cobra.Command { diff --git a/cmd/root.go b/cmd/root.go index 93e4094..5edcd60 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -34,7 +34,7 @@ var ( var rootCmd = &cobra.Command{ Use: "macli", - Version: "v1.19.0" + " " + runtime.GOOS + "/" + runtime.GOARCH, + Version: "v1.20.0" + " " + runtime.GOOS + "/" + runtime.GOARCH, Short: "macli - Unofficial CLI-Based MyAnimeList Client.", Long: "macli is an unofficial MyAnimeClient for use inside the terminal.\n" + diff --git a/cmd/score.go b/cmd/score.go index f7396e7..7b1dfca 100644 --- a/cmd/score.go +++ b/cmd/score.go @@ -24,12 +24,10 @@ import ( "strings" "strconv" "errors" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/mal" - "github.com/MikunoNaka/macli/util" - a "github.com/MikunoNaka/MAL2Go/v4/anime" - m "github.com/MikunoNaka/MAL2Go/v4/manga" - + "vidhukant.com/macli/ui" + "vidhukant.com/macli/mal" + "vidhukant.com/macli/util" + "vidhukant.com/mg" "github.com/spf13/cobra" ) @@ -90,7 +88,7 @@ func validateScore(input string, currentScore int) (int, error) { } func setAnimeScore(scoreInput, searchInput string) { - var selectedAnime a.Anime + var selectedAnime mg.Anime if entryId > 0 { selectedAnime = mal.GetAnimeData(entryId, []string{"my_list_status"}) } @@ -129,7 +127,7 @@ func setAnimeScore(scoreInput, searchInput string) { } func setMangaScore(scoreInput, searchInput string) { - var selectedManga m.Manga + var selectedManga mg.Manga if entryId > 0 { selectedManga = mal.GetMangaData(entryId, []string{"my_list_status"}) } diff --git a/cmd/search.go b/cmd/search.go index 8413804..48877f9 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -22,12 +22,10 @@ import ( "fmt" "os" "strings" - - "github.com/MikunoNaka/macli/mal" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/util" - a "github.com/MikunoNaka/MAL2Go/v4/anime" - m "github.com/MikunoNaka/MAL2Go/v4/manga" + "vidhukant.com/macli/mal" + "vidhukant.com/macli/ui" + "vidhukant.com/macli/util" + "vidhukant.com/mg" "github.com/spf13/cobra" ) @@ -70,7 +68,7 @@ var searchCmd = &cobra.Command { } func searchManga(searchInput string) { - var selectedManga m.Manga + var selectedManga mg.Manga mangaId := entryId fields := []string{} @@ -97,7 +95,7 @@ func searchManga(searchInput string) { } func searchAnime(searchInput string) { - var selectedAnime a.Anime + var selectedAnime mg.Anime animeId := entryId fields := []string{} diff --git a/cmd/status.go b/cmd/status.go index 6b63def..533f465 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -22,12 +22,10 @@ import ( "fmt" "os" "strings" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/util" - "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v4/anime" - m "github.com/MikunoNaka/MAL2Go/v4/manga" - + "vidhukant.com/macli/ui" + "vidhukant.com/macli/util" + "vidhukant.com/macli/mal" + "vidhukant.com/mg" "github.com/spf13/cobra" ) @@ -78,7 +76,7 @@ var statusCmd = &cobra.Command{ } func setAnimeStatus(statusInput, searchInput string) { - var selectedAnime a.Anime + var selectedAnime mg.Anime if entryId > 0 { selectedAnime = mal.GetAnimeData(entryId, []string{"my_list_status"}) } @@ -112,7 +110,7 @@ func setAnimeStatus(statusInput, searchInput string) { } func setMangaStatus(statusInput, searchInput string) { - var selectedManga m.Manga + var selectedManga mg.Manga if entryId > 0 { selectedManga = mal.GetMangaData(entryId, []string{"my_list_status"}) } diff --git a/cmd/user_info.go b/cmd/user_info.go index f8c194c..38346c8 100644 --- a/cmd/user_info.go +++ b/cmd/user_info.go @@ -21,7 +21,7 @@ package cmd import ( "fmt" "github.com/spf13/cobra" - "github.com/MikunoNaka/macli/mal" + "vidhukant.com/macli/mal" ) var userInfoCmd = &cobra.Command { diff --git a/cmd/volumes.go b/cmd/volumes.go index 1fb54ce..5b77e41 100644 --- a/cmd/volumes.go +++ b/cmd/volumes.go @@ -22,11 +22,10 @@ import ( "os" "fmt" "strings" - "github.com/MikunoNaka/macli/ui" - "github.com/MikunoNaka/macli/util" - "github.com/MikunoNaka/macli/mal" - m "github.com/MikunoNaka/MAL2Go/v4/manga" - + "vidhukant.com/macli/ui" + "vidhukant.com/macli/util" + "vidhukant.com/macli/mal" + "vidhukant.com/mg" "github.com/spf13/cobra" ) @@ -55,7 +54,7 @@ var volumesCmd = &cobra.Command{ ui.PromptLength = conf.PromptLength mal.Init() - var selectedManga m.Manga + var selectedManga mg.Manga if entryId > 0 { selectedManga = mal.GetMangaData(entryId, []string{"my_list_status", "num_volumes"}) } |