diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-08-17 22:42:12 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-08-17 22:42:12 +0530 |
commit | ccef1f9a0035a5b8e3494bcc22c09ad3acc49097 (patch) | |
tree | a20228902afdd0af64683f38fcf270bbc3fa1670 /cmd | |
parent | adffba663dbe8daebe311dc8f3ae5d40109cb2dd (diff) |
reading auth token from config file (if any)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/list.go | 20 | ||||
-rw-r--r-- | cmd/search.go | 1 | ||||
-rw-r--r-- | cmd/status.go | 1 | ||||
-rw-r--r-- | cmd/version.go | 2 |
4 files changed, 11 insertions, 13 deletions
diff --git a/cmd/list.go b/cmd/list.go index 6cb95fb..e6f7f8c 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -76,14 +76,14 @@ var listCmd = &cobra.Command{ } func init() { - rootCmd.AddCommand(listCmd) - listCmd.Flags().StringP("status", "", "", "Status (leave blank for all)") - listCmd.Flags().StringP("user", "", "@me", "User (@me or blank for self)") - listCmd.Flags().StringP("sort", "", "list_score", "Sort the list") - listCmd.Flags().BoolP("include-nsfw", "", listIncludeNsfw, "Include NSFW results") - listCmd.Flags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode") - listCmd.Flags().StringVarP(&mal.Secret, "authentication-token", "t", "", "MyAnimeList authentication token to use (overrides system keyring if any)") - // TODO: implement below 2 flags - // listCmd.Flags().IntVarP(&mal.SearchLength, "list-length", "n", listLength, "Amount of list items to load (default: all)") - // listCmd.Flags().IntVarP(&mal.SearchOffset, "list-offset", "o", listOffset, "Offset for the list") + rootCmd.AddCommand(listCmd) + listCmd.Flags().StringP("status", "", "", "Status (leave blank for all)") + listCmd.Flags().StringP("user", "", "@me", "User (@me or blank for self)") + listCmd.Flags().StringP("sort", "", "list_score", "Sort the list") + listCmd.Flags().BoolP("include-nsfw", "", listIncludeNsfw, "Include NSFW results") + listCmd.Flags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode") + listCmd.Flags().StringVarP(&mal.Secret, "authentication-token", "t", "", "MyAnimeList authentication token to use (overrides system keyring if any)") + // TODO: implement below 2 flags + // listCmd.Flags().IntVarP(&mal.SearchLength, "list-length", "n", listLength, "Amount of list items to load (default: all)") + // listCmd.Flags().IntVarP(&mal.SearchOffset, "list-offset", "o", listOffset, "Offset for the list") } diff --git a/cmd/search.go b/cmd/search.go index 76babf4..57f1980 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -113,7 +113,6 @@ func searchAnime(searchInput string) { } func init() { - fmt.Println("searchInit") rootCmd.AddCommand(searchCmd) searchCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", promptLength, "Length of select prompt") searchCmd.Flags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode") diff --git a/cmd/status.go b/cmd/status.go index 53e93c6..2dc6fee 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -133,7 +133,6 @@ func setMangaStatus(statusInput, searchInput string) { } func init() { - fmt.Println("statusINit") rootCmd.AddCommand(statusCmd) statusCmd.Flags().StringP("set-value", "s", "", "status to be set") statusCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt") diff --git a/cmd/version.go b/cmd/version.go index a1c3ca2..ec7b5c6 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" ) -const version string = "no-keyring test" +const version string = "v1.12.1" var versionCmd = &cobra.Command { Use: "version", |