From f668a0255d0552fed9fbd30343341dbae4f92dcd Mon Sep 17 00:00:00 2001 From: aryan <85390033+theredditbandit@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:17:05 +0530 Subject: [PATCH 1/2] minor change --- cmd/set.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/set.go b/cmd/set.go index 856f5d4..482db43 100644 --- a/cmd/set.go +++ b/cmd/set.go @@ -16,7 +16,7 @@ var setCmd = &cobra.Command{ Common statuses: Indexed (default) ,Idea , Started , Paused , Completed , Aborted , Ongoing , Not Started `, - Run: func(cmd *cobra.Command, args []string) { // BUG : cannot set the status using the alias. + Run: func(cmd *cobra.Command, args []string) { interactiveFlag, _ := cmd.Flags().GetBool("i") // TODO: Implement this if interactiveFlag { fmt.Println("Not implemented yet") @@ -29,7 +29,6 @@ var setCmd = &cobra.Command{ var pname string alias := args[0] status := args[1] - project, err := db.GetRecord(alias, ProjectAliasBucket) if err == nil { pname = project From 49f0aa4a8ae30aca49d120061f95be48e17aab6f Mon Sep 17 00:00:00 2001 From: aryan <85390033+theredditbandit@users.noreply.github.com> Date: Sun, 21 Apr 2024 01:26:28 +0530 Subject: [PATCH 2/2] rename project --- cmd/add.go | 2 +- cmd/alias.go | 3 +-- cmd/delete.go | 4 ++-- cmd/info.go | 2 +- cmd/init.go | 2 +- cmd/ls.go | 13 ++++--------- cmd/reset.go | 2 +- cmd/set.go | 2 +- cmd/status.go | 4 ++-- go.mod | 2 +- main.go | 2 +- pkg/indexer.go | 2 +- pkg/ui/statusTable.go | 4 ++-- pkg/utils.go | 2 +- 14 files changed, 20 insertions(+), 26 deletions(-) diff --git a/cmd/add.go b/cmd/add.go index 8f062af..d7bbd7f 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -2,7 +2,7 @@ package cmd import ( "github.com/spf13/cobra" - "pman/pkg" + "github.com/theredditbandit/pman/pkg" ) var addCmd = &cobra.Command{ diff --git a/cmd/alias.go b/cmd/alias.go index c80a959..7457fe3 100644 --- a/cmd/alias.go +++ b/cmd/alias.go @@ -2,9 +2,8 @@ package cmd import ( "fmt" - "pman/pkg/db" - "github.com/spf13/cobra" + "github.com/theredditbandit/pman/pkg/db" ) // aliasCmd represents the alias command diff --git a/cmd/delete.go b/cmd/delete.go index d0c4886..d95cb72 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -2,8 +2,8 @@ package cmd import ( "fmt" + "github.com/theredditbandit/pman/pkg/db" "log" - "pman/pkg/db" "github.com/spf13/cobra" ) @@ -44,7 +44,7 @@ var delCmd = &cobra.Command{ log.Fatal(err) } - fmt.Printf("Successfully deleted %s from the db \n",projName) + fmt.Printf("Successfully deleted %s from the db \n", projName) }, } diff --git a/cmd/info.go b/cmd/info.go index 5b28b54..7a90976 100644 --- a/cmd/info.go +++ b/cmd/info.go @@ -2,9 +2,9 @@ package cmd import ( "fmt" + "github.com/theredditbandit/pman/pkg/db" "os" "path/filepath" - "pman/pkg/db" "github.com/charmbracelet/glamour" "github.com/spf13/cobra" diff --git a/cmd/init.go b/cmd/init.go index 315cf63..8afd574 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -1,7 +1,7 @@ package cmd import ( - "pman/pkg" + "github.com/theredditbandit/pman/pkg" "github.com/spf13/cobra" ) diff --git a/cmd/ls.go b/cmd/ls.go index 18488d5..6b89995 100644 --- a/cmd/ls.go +++ b/cmd/ls.go @@ -2,12 +2,11 @@ package cmd import ( "fmt" - "log" - "pman/pkg" - "pman/pkg/db" - "pman/pkg/ui" - "github.com/spf13/cobra" + "github.com/theredditbandit/pman/pkg" + "github.com/theredditbandit/pman/pkg/db" + "github.com/theredditbandit/pman/pkg/ui" + "log" ) var lsCmd = &cobra.Command{ @@ -25,14 +24,10 @@ var lsCmd = &cobra.Command{ if filterFlag != "" { fmt.Println("Filtering by status : ", filterFlag) data := pkg.FilterByStatus(data, filterFlag) - _ = data ui.RenderTable(data) - // ui.Pikachu() return } ui.RenderTable(data) - // ui.Pikachu() - }, } diff --git a/cmd/reset.go b/cmd/reset.go index b967ba5..aa31f9b 100644 --- a/cmd/reset.go +++ b/cmd/reset.go @@ -2,7 +2,7 @@ package cmd import ( "fmt" - "pman/pkg/db" + "github.com/theredditbandit/pman/pkg/db" "github.com/spf13/cobra" ) diff --git a/cmd/set.go b/cmd/set.go index 482db43..28df683 100644 --- a/cmd/set.go +++ b/cmd/set.go @@ -2,7 +2,7 @@ package cmd import ( "fmt" - "pman/pkg/db" + "github.com/theredditbandit/pman/pkg/db" "github.com/spf13/cobra" ) diff --git a/cmd/status.go b/cmd/status.go index 40e8cf0..08645e3 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -2,8 +2,8 @@ package cmd import ( "fmt" - "pman/pkg" - "pman/pkg/db" + "github.com/theredditbandit/pman/pkg" + "github.com/theredditbandit/pman/pkg/db" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index e00d48c..4c84134 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module pman +module github.com/theredditbandit/pman go 1.22.2 diff --git a/main.go b/main.go index 6935cf3..a05daae 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -import "pman/cmd" +import "github.com/theredditbandit/pman/cmd" func main() { cmd.Execute() diff --git a/pkg/indexer.go b/pkg/indexer.go index 9e0ac68..65cd782 100644 --- a/pkg/indexer.go +++ b/pkg/indexer.go @@ -2,10 +2,10 @@ package pkg import ( "fmt" + "github.com/theredditbandit/pman/pkg/db" "log" "os" "path/filepath" - "pman/pkg/db" ) const StatusBucket = "projects" diff --git a/pkg/ui/statusTable.go b/pkg/ui/statusTable.go index 63bc562..025b021 100644 --- a/pkg/ui/statusTable.go +++ b/pkg/ui/statusTable.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss/table" + "github.com/theredditbandit/pman/pkg" + "github.com/theredditbandit/pman/pkg/db" "os" - "pman/pkg" - "pman/pkg/db" "sort" ) diff --git a/pkg/utils.go b/pkg/utils.go index 38ed372..14f76cc 100644 --- a/pkg/utils.go +++ b/pkg/utils.go @@ -2,9 +2,9 @@ package pkg import ( "fmt" + "github.com/theredditbandit/pman/pkg/db" "golang.org/x/text/cases" "golang.org/x/text/language" - "pman/pkg/db" ) func TitleCase(s string) string {