Skip to content

Commit

Permalink
Changed tcell color to ascii color codes on root
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemkosk committed Jun 14, 2024
1 parent 10e6110 commit 3c0b7de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
13 changes: 4 additions & 9 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,24 @@ import (

config "github.com/erdemkosk/envolve-go/internal"
"github.com/erdemkosk/envolve-go/internal/logic"
"github.com/erdemkosk/envolve-go/internal/util"
"github.com/spf13/cobra"
)

var (
mainColor = util.TcellColorToAnsi(config.MAIN_COLOR)
)

type Command interface {
Execute(cmd *cobra.Command, args []string)
}

var rootCmd = &cobra.Command{
Use: "envolve",
Short: "Envolve CLI is a tool for effortless .env file management.",
Long: ` ` + mainColor + `Envolve ` + config.RESET + ` is your solution for effortless .env file management. With ` + mainColor + `Envolve ` + config.RESET + `,you can seamlessly gather, arrange, and fine-tune environment variables
across all your projects, ensuring that your configuration data is always at your fingertips without the risk of loss. `,
Long: `` + config.PASTEL_ORANGE + `Envolve ` + config.RESET + `is your solution for effortless .env file management. With ` + config.PASTEL_ORANGE + `Envolve ` + config.RESET + `,you can seamlessly gather, arrange, and fine-tune environment variables
across all your projects, ensuring that your configuration data is always at your fingertips without the risk of loss. `,
}

var customHelpTemplate = fmt.Sprintf(`{{with (or .Long .Short)}}{{. | trimTrailingWhitespaces}}{{end}}
Usage:
` + mainColor + `{{.UseLine}}{{if .HasAvailableSubCommands}} ` + config.RESET + `
` + config.PASTEL_ORANGE + `{{.UseLine}}{{if .HasAvailableSubCommands}} ` + config.RESET + `
` + config.PASTEL_RED + `Warning:
If you have not synchronized any of your projects, everything will be shown as an empty folder in show and edit commands. Edit and show work in already synced projects. ` + config.RESET + `
Expand All @@ -38,7 +33,7 @@ var customHelpTemplate = fmt.Sprintf(`{{with (or .Long .Short)}}{{. | trimTraili
In the description, you will find example information that you can give a path to a folder you want, not the current folder, with --path. ` + config.RESET + `
Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}}
` + mainColor + `{{rpad .Name .NamePadding }}` + config.RESET + ` ` + config.PASTEL_BLUE + ` {{.Short}}{{end}}{{end}}{{end}} ` + config.RESET + `
` + config.PASTEL_GRAY + `{{rpad .Name .NamePadding }}` + config.RESET + ` ` + config.PASTEL_BLUE + ` {{.Short}}{{end}}{{end}}{{end}} ` + config.RESET + `
Flags:
{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}
Expand Down
6 changes: 5 additions & 1 deletion internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ const (
RESET = "\033[0m"
RED = "\033[31m"
PASTEL_RED = "\033[91m"
PESTEL_GREEN = "\033[92m"
PASTEL_GREEN = "\033[92m"
PASTEL_YELLOW = "\033[93m"
PASTEL_BLUE = "\033[94m"
PASTEL_MAGENTA = "\033[95m"
PASTEL_CYAN = "\033[96m"
PASTEL_WHITE = "\033[97m"
PASTEL_GRAY = "\033[37m"
PASTEL_PURPLE = "\033[35m"
PASTEL_ORANGE = "\033[38;5;214m" // Bir pastel turuncu tonu ekledim
)
13 changes: 0 additions & 13 deletions internal/util/asci.go

This file was deleted.

0 comments on commit 3c0b7de

Please sign in to comment.