From e0ad385d91e3b2992b6bfb141a3a1771260aa0fe Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Mon, 5 Jan 2026 21:07:10 -0800 Subject: [PATCH 01/16] removing old svg --- pokemon.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 pokemon.svg diff --git a/pokemon.svg b/pokemon.svg deleted file mode 100644 index 54383676..00000000 --- a/pokemon.svg +++ /dev/null @@ -1 +0,0 @@ -Pokémon From 213f893e272acc933c7d5cc183a2671ef6dcf12c Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Mon, 5 Jan 2026 21:34:25 -0800 Subject: [PATCH 02/16] normalizing hint text across commands (#225) --- cli.go | 2 +- cmd/ability/ability.go | 2 +- cmd/item/item.go | 4 ++-- cmd/move/move.go | 12 ++++++++---- cmd/pokemon/pokemon.go | 2 +- styling/styling.go | 2 ++ 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cli.go b/cli.go index 1f2add9b..8cc85025 100644 --- a/cli.go +++ b/cli.go @@ -80,7 +80,7 @@ func runCLI(args []string) int { fmt.Sprintf("\n\t%-15s %s", "search", "Search for a resource"), fmt.Sprintf("\n\t%-15s %s", "speed", "Calculate the speed of a Pokémon in battle"), fmt.Sprintf("\n\t%-15s %s", "types", "Get details about a typing"), - "\n\n", styling.StyleItalic.Render("hint: when calling a resource with a space, use a hyphen"), + "\n\n", styling.StyleItalic.Render(styling.HyphenHint), "\n", styling.StyleItalic.Render("example: poke-cli ability strong-jaw"), "\n", styling.StyleItalic.Render("example: poke-cli pokemon flutter-mane"), "\n\n", fmt.Sprintf("%s %s", "↓ ctrl/cmd + click for docs/guides\n", styling.DocsLink), diff --git a/cmd/ability/ability.go b/cmd/ability/ability.go index f1281448..24235ee5 100644 --- a/cmd/ability/ability.go +++ b/cmd/ability/ability.go @@ -22,7 +22,7 @@ func AbilityCommand() (string, error) { "Get details about a specific ability.\n\n", styling.StyleBold.Render("USAGE:"), fmt.Sprintf("\n\t%s %s %s %s", "poke-cli", styling.StyleBold.Render("ability"), "", "[flag]"), - fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render("Use a hyphen when typing a name with a space.")), + fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render(styling.HyphenHint)), "\n\n", styling.StyleBold.Render("FLAGS:"), fmt.Sprintf("\n\t%-30s %s", "-p, --pokemon", "Prints Pokémon that learn this ability."), diff --git a/cmd/item/item.go b/cmd/item/item.go index 4c5b1623..0fb6a740 100644 --- a/cmd/item/item.go +++ b/cmd/item/item.go @@ -22,8 +22,8 @@ func ItemCommand() (string, error) { helpMessage := styling.HelpBorder.Render( "Get details about a specific item.\n\n", styling.StyleBold.Render("USAGE:"), - fmt.Sprintf("\n\t%s %s %s %s", "poke-cli", styling.StyleBold.Render("item"), "", "[flag]"), - fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render("Use a hyphen when typing a name with a space.")), + fmt.Sprintf("\n\t%s %s %s", "poke-cli", styling.StyleBold.Render("item"), ""), + fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render(styling.HyphenHint)), "\n\n", styling.StyleBold.Render("FLAGS:"), fmt.Sprintf("\n\t%-30s %s", "-h, --help", "Prints the help menu."), diff --git a/cmd/move/move.go b/cmd/move/move.go index 6281ad7f..13b3f24c 100644 --- a/cmd/move/move.go +++ b/cmd/move/move.go @@ -3,6 +3,10 @@ package move import ( "flag" "fmt" + "os" + "strconv" + "strings" + "github.com/charmbracelet/lipgloss" "github.com/digitalghost-dev/poke-cli/cmd/utils" "github.com/digitalghost-dev/poke-cli/connections" @@ -10,9 +14,6 @@ import ( "github.com/digitalghost-dev/poke-cli/styling" "golang.org/x/text/cases" "golang.org/x/text/language" - "os" - "strconv" - "strings" ) func MoveCommand() (string, error) { @@ -23,7 +24,10 @@ func MoveCommand() (string, error) { "Get details about a specific move.\n\n", styling.StyleBold.Render("USAGE:"), "\n\t"+"poke-cli"+" "+styling.StyleBold.Render("move")+" ", - "\n\n"+styling.StyleItalic.Render("Use a hyphen when typing a name with a space."), + fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render(styling.HyphenHint)), + "\n\n", + styling.StyleBold.Render("FLAGS:"), + fmt.Sprintf("\n\t%-30s %s", "-h, --help", "Prints the help menu."), ) output.WriteString(helpMessage) } diff --git a/cmd/pokemon/pokemon.go b/cmd/pokemon/pokemon.go index 918fae1a..dddd8750 100644 --- a/cmd/pokemon/pokemon.go +++ b/cmd/pokemon/pokemon.go @@ -31,7 +31,7 @@ func PokemonCommand() (string, error) { "Get details about a specific Pokémon.\n\n", styling.StyleBold.Render("USAGE:"), fmt.Sprintf("\n\t%s %s %s %s", "poke-cli", styling.StyleBold.Render("pokemon"), "", "[flag]"), - fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render("Use a hyphen when typing a name with a space.")), + fmt.Sprintf("\n\t%-30s", styling.StyleItalic.Render(styling.HyphenHint)), "\n\n", styling.StyleBold.Render("FLAGS:"), fmt.Sprintf("\n\t%-30s %s", "-a, --abilities", "Prints the Pokémon's abilities."), diff --git a/styling/styling.go b/styling/styling.go index 3e4ac933..9299e256 100644 --- a/styling/styling.go +++ b/styling/styling.go @@ -24,6 +24,8 @@ var ( Foreground(lipgloss.AdaptiveColor{Light: "#E1AD01", Dark: "#FFCC00"}). Render("\x1b]8;;https://docs.poke-cli.com\x1b\\docs.poke-cli.com\x1b]8;;\x1b\\") + HyphenHint = "Use a hyphen when typing a name with a space." + StyleBold = lipgloss.NewStyle().Bold(true) StyleItalic = lipgloss.NewStyle().Italic(true) StyleUnderline = lipgloss.NewStyle().Underline(true) From 35455106708f9c97d5111f7f0d37e1a90020d664 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Wed, 7 Jan 2026 15:32:52 -0800 Subject: [PATCH 03/16] creating helper function for help flag check (#226) --- cmd/ability/ability.go | 4 ++-- cmd/berry/berry.go | 3 +-- cmd/card/card.go | 3 +-- cmd/item/item.go | 4 ++-- cmd/move/move.go | 4 ++-- cmd/natures/natures.go | 9 +++++---- cmd/pokemon/pokemon.go | 4 ++-- cmd/speed/speed.go | 3 +-- cmd/types/types.go | 3 +-- cmd/utils/output.go | 8 ++++++++ 10 files changed, 25 insertions(+), 20 deletions(-) diff --git a/cmd/ability/ability.go b/cmd/ability/ability.go index 24235ee5..d2fd30f2 100644 --- a/cmd/ability/ability.go +++ b/cmd/ability/ability.go @@ -37,8 +37,8 @@ func AbilityCommand() (string, error) { flag.Parse() - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + // Handle help flag + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/berry/berry.go b/cmd/berry/berry.go index 22f99784..7e98165d 100644 --- a/cmd/berry/berry.go +++ b/cmd/berry/berry.go @@ -33,8 +33,7 @@ func BerryCommand() (string, error) { flag.Parse() // Handle help flag - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/card/card.go b/cmd/card/card.go index dc3ed96e..7b16409f 100644 --- a/cmd/card/card.go +++ b/cmd/card/card.go @@ -29,8 +29,7 @@ func CardCommand() (string, error) { flag.Parse() // Handle help flag - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/item/item.go b/cmd/item/item.go index 0fb6a740..ff63e484 100644 --- a/cmd/item/item.go +++ b/cmd/item/item.go @@ -35,8 +35,8 @@ func ItemCommand() (string, error) { flag.Parse() - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + // Handle help flag + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/move/move.go b/cmd/move/move.go index 13b3f24c..2642ff5e 100644 --- a/cmd/move/move.go +++ b/cmd/move/move.go @@ -34,8 +34,8 @@ func MoveCommand() (string, error) { flag.Parse() - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + // Handle help flag + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/natures/natures.go b/cmd/natures/natures.go index bdd16e55..da0cbc74 100644 --- a/cmd/natures/natures.go +++ b/cmd/natures/natures.go @@ -3,12 +3,13 @@ package natures import ( "flag" "fmt" + "os" + "strings" + "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss/table" "github.com/digitalghost-dev/poke-cli/cmd/utils" "github.com/digitalghost-dev/poke-cli/styling" - "os" - "strings" ) func NaturesCommand() (string, error) { @@ -25,8 +26,8 @@ func NaturesCommand() (string, error) { flag.Parse() - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + // Handle help flag + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/pokemon/pokemon.go b/cmd/pokemon/pokemon.go index dddd8750..01068e27 100644 --- a/cmd/pokemon/pokemon.go +++ b/cmd/pokemon/pokemon.go @@ -51,8 +51,8 @@ func PokemonCommand() (string, error) { flag.Parse() - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + // Handle help flag + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/speed/speed.go b/cmd/speed/speed.go index 48928f95..6fe29584 100644 --- a/cmd/speed/speed.go +++ b/cmd/speed/speed.go @@ -108,8 +108,7 @@ func SpeedCommand() (string, error) { flag.Parse() // Handle help flag - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/types/types.go b/cmd/types/types.go index a78cf83f..6539157a 100644 --- a/cmd/types/types.go +++ b/cmd/types/types.go @@ -31,8 +31,7 @@ func TypesCommand() (string, error) { flag.Parse() // Handle help flag - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { - flag.Usage() + if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } diff --git a/cmd/utils/output.go b/cmd/utils/output.go index e658261e..a73a4be5 100644 --- a/cmd/utils/output.go +++ b/cmd/utils/output.go @@ -26,6 +26,14 @@ func HandleFlagError(output *strings.Builder, err error) (string, error) { return "", fmt.Errorf("error parsing flags: %w", err) } +func CheckHelpFlag(output *strings.Builder, usageFunc func()) bool { + if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { + usageFunc() + return true + } + return false +} + func WrapText(text string, width int) string { words := strings.Fields(text) if len(words) == 0 { From 64fd2ad2ed07e1ce573b56f9edbb1c9e2b7272f7 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Wed, 7 Jan 2026 19:08:13 -0800 Subject: [PATCH 04/16] updating test files --- cmd/utils/output_test.go | 116 +++++++++++++++++++++++++++++++ testdata/cli_help.golden | 2 +- testdata/item_help.golden | 2 +- testdata/main_latest_flag.golden | 2 +- testdata/move_help.golden | 18 ++--- 5 files changed, 129 insertions(+), 11 deletions(-) diff --git a/cmd/utils/output_test.go b/cmd/utils/output_test.go index cc2c8656..be92c8cc 100644 --- a/cmd/utils/output_test.go +++ b/cmd/utils/output_test.go @@ -136,3 +136,119 @@ func TestWrapText_MultipleLines(t *testing.T) { t.Fatalf("expected %q, got %q", expected, got) } } + +func TestCheckHelpFlag_ShortFlag(t *testing.T) { + // Save and restore original os.Args + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + + os.Args = []string{"poke-cli", "pokemon", "-h"} + + var output strings.Builder + usageCalled := false + usageFunc := func() { + output.WriteString("help message") + usageCalled = true + } + + result := CheckHelpFlag(&output, usageFunc) + + if !result { + t.Error("CheckHelpFlag should return true for -h flag") + } + if !usageCalled { + t.Error("usage function should be called for -h flag") + } +} + +func TestCheckHelpFlag_LongFlag(t *testing.T) { + // Save and restore original os.Args + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + + os.Args = []string{"poke-cli", "pokemon", "--help"} + + var output strings.Builder + usageCalled := false + usageFunc := func() { + output.WriteString("help message") + usageCalled = true + } + + result := CheckHelpFlag(&output, usageFunc) + + if !result { + t.Error("CheckHelpFlag should return true for --help flag") + } + if !usageCalled { + t.Error("usage function should be called for --help flag") + } +} + +func TestCheckHelpFlag_NoFlag(t *testing.T) { + // Save and restore original os.Args + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + + os.Args = []string{"poke-cli", "pokemon", "charizard"} + + var output strings.Builder + usageCalled := false + usageFunc := func() { + usageCalled = true + } + + result := CheckHelpFlag(&output, usageFunc) + + if result { + t.Error("CheckHelpFlag should return false when no help flag present") + } + if usageCalled { + t.Error("usage function should not be called when no help flag present") + } +} + +func TestCheckHelpFlag_WrongNumberOfArgs(t *testing.T) { + tests := []struct { + name string + args []string + }{ + { + name: "too few args", + args: []string{"poke-cli", "pokemon"}, + }, + { + name: "too many args", + args: []string{"poke-cli", "pokemon", "-h", "extra"}, + }, + { + name: "help flag in wrong position", + args: []string{"poke-cli", "pokemon", "charizard", "-h"}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Save and restore original os.Args + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + + os.Args = tt.args + + var output strings.Builder + usageCalled := false + usageFunc := func() { + usageCalled = true + } + + result := CheckHelpFlag(&output, usageFunc) + + if result { + t.Errorf("CheckHelpFlag should return false for args: %v", tt.args) + } + if usageCalled { + t.Errorf("usage function should not be called for args: %v", tt.args) + } + }) + } +} diff --git a/testdata/cli_help.golden b/testdata/cli_help.golden index a86fca94..9596b169 100644 --- a/testdata/cli_help.golden +++ b/testdata/cli_help.golden @@ -23,7 +23,7 @@ │ speed Calculate the speed of a Pokémon in battle │ │ types Get details about a typing │ │ │ -│ hint: when calling a resource with a space, use a hyphen │ +│ Use a hyphen when typing a name with a space. │ │ example: poke-cli ability strong-jaw │ │ example: poke-cli pokemon flutter-mane │ │ │ diff --git a/testdata/item_help.golden b/testdata/item_help.golden index c197516b..f41f947a 100644 --- a/testdata/item_help.golden +++ b/testdata/item_help.golden @@ -2,7 +2,7 @@ │Get details about a specific item. │ │ │ │ USAGE: │ -│ poke-cli item [flag] │ +│ poke-cli item │ │ Use a hyphen when typing a name with a space. │ │ │ │ FLAGS: │ diff --git a/testdata/main_latest_flag.golden b/testdata/main_latest_flag.golden index 2de4c1c9..1b715f77 100644 --- a/testdata/main_latest_flag.golden +++ b/testdata/main_latest_flag.golden @@ -2,6 +2,6 @@ ┃ ┃ ┃ Latest available release ┃ ┃ on GitHub: ┃ -┃ • v1.8.3 ┃ +┃ • v1.8.4 ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ diff --git a/testdata/move_help.golden b/testdata/move_help.golden index 998fb119..4a41117c 100644 --- a/testdata/move_help.golden +++ b/testdata/move_help.golden @@ -1,8 +1,10 @@ -╭─────────────────────────────────────────────╮ -│Get details about a specific move. │ -│ │ -│ USAGE: │ -│ poke-cli move │ -│ │ -│Use a hyphen when typing a name with a space.│ -╰─────────────────────────────────────────────╯ \ No newline at end of file +╭────────────────────────────────────────────────────────╮ +│Get details about a specific move. │ +│ │ +│ USAGE: │ +│ poke-cli move │ +│ Use a hyphen when typing a name with a space. │ +│ │ +│ FLAGS: │ +│ -h, --help Prints the help menu.│ +╰────────────────────────────────────────────────────────╯ \ No newline at end of file From 7f53af717709b76c0c6b3d451654f1d404d5c814 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Thu, 8 Jan 2026 21:57:10 -0800 Subject: [PATCH 05/16] adding sensors --- card_data/pipelines/definitions.py | 2 ++ card_data/pipelines/sensors.py | 39 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 card_data/pipelines/sensors.py diff --git a/card_data/pipelines/definitions.py b/card_data/pipelines/definitions.py index 892db841..d8a6cb17 100644 --- a/card_data/pipelines/definitions.py +++ b/card_data/pipelines/definitions.py @@ -6,6 +6,7 @@ from .defs.extract.tcgcsv.extract_pricing import build_dataframe from .defs.load.tcgcsv.load_pricing import load_pricing_data, data_quality_checks_on_pricing +from .sensors import discord_success_sensor, discord_failure_sensor @definitions @@ -31,4 +32,5 @@ def defs() -> dg.Definitions: assets=[build_dataframe, load_pricing_data, data_quality_checks_on_pricing], jobs=[pricing_pipeline_job], schedules=[price_schedule], + sensors=[discord_success_sensor, discord_failure_sensor] ) \ No newline at end of file diff --git a/card_data/pipelines/sensors.py b/card_data/pipelines/sensors.py new file mode 100644 index 00000000..a4168e54 --- /dev/null +++ b/card_data/pipelines/sensors.py @@ -0,0 +1,39 @@ +import requests +from dagster import DagsterRunStatus, RunStatusSensorContext, run_status_sensor + + +@run_status_sensor(run_status=DagsterRunStatus.SUCCESS, name="discord_success_sensor") +def discord_success_sensor(context: RunStatusSensorContext): + context.log.info(f"Detected successful run: {context.dagster_run.run_id}") + try: + response = requests.post( + "https://digitalghost-dev.app.n8n.cloud/webhook/3a58517d-c027-44fa-974c-aedc0035c4f7", + json={ + "job_name": context.dagster_run.job_name, + "status": "SUCCESS", + "run_id": context.dagster_run.run_id, + }, + timeout=10, + ) + context.log.info(f"n8n response: {response.status_code}") + except Exception as e: + context.log.error(f"Failed to send notification: {e}") + + +@run_status_sensor(run_status=DagsterRunStatus.FAILURE, name="discord_failure_sensor") +def discord_failure_sensor(context: RunStatusSensorContext): + context.log.info(f"Detected failed run: {context.dagster_run.run_id}") + try: + response = requests.post( + "https://digitalghost-dev.app.n8n.cloud/webhook/3a58517d-c027-44fa-974c-aedc0035c4f7", + json={ + "job_name": context.dagster_run.job_name, + "status": "FAILURE", + "run_id": context.dagster_run.run_id, + }, + timeout=10, + + ) + context.log.info(f"n8n response: {response.status_code}") + except Exception as e: + context.log.error(f"Failed to send notification: {e}") From a8ea0cdff3e267adf1847f10cea080210e492623 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 08:58:45 -0800 Subject: [PATCH 06/16] adding `CapitalizeResourceName()` utility (#227) --- cmd/ability/ability.go | 4 +--- cmd/item/item.go | 6 ++---- cmd/move/move.go | 2 +- cmd/pokemon/pokemon.go | 4 ++-- flags/pokemonflagset.go | 4 ++-- styling/styling.go | 12 ++++++++++++ 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/cmd/ability/ability.go b/cmd/ability/ability.go index d2fd30f2..a902992f 100644 --- a/cmd/ability/ability.go +++ b/cmd/ability/ability.go @@ -10,8 +10,6 @@ import ( "github.com/digitalghost-dev/poke-cli/connections" "github.com/digitalghost-dev/poke-cli/flags" "github.com/digitalghost-dev/poke-cli/styling" - "golang.org/x/text/cases" - "golang.org/x/text/language" ) func AbilityCommand() (string, error) { @@ -81,7 +79,7 @@ func AbilityCommand() (string, error) { } } - capitalizedAbility := cases.Title(language.English).String(strings.ReplaceAll(abilityName, "-", " ")) + capitalizedAbility := styling.CapitalizeResourceName(abilityName) output.WriteString(styling.StyleBold.Render(capitalizedAbility) + "\n") generationParts := strings.Split(abilitiesStruct.Generation.Name, "-") diff --git a/cmd/item/item.go b/cmd/item/item.go index ff63e484..1b9b6bab 100644 --- a/cmd/item/item.go +++ b/cmd/item/item.go @@ -11,8 +11,6 @@ import ( "github.com/digitalghost-dev/poke-cli/connections" "github.com/digitalghost-dev/poke-cli/structs" "github.com/digitalghost-dev/poke-cli/styling" - "golang.org/x/text/cases" - "golang.org/x/text/language" ) func ItemCommand() (string, error) { @@ -60,9 +58,9 @@ func ItemCommand() (string, error) { } func itemInfoContainer(output *strings.Builder, itemStruct structs.ItemJSONStruct, itemName string) { - capitalizedItem := styling.StyleBold.Render(cases.Title(language.English).String(strings.ReplaceAll(itemName, "-", " "))) + capitalizedItem := styling.StyleBold.Render(styling.CapitalizeResourceName(itemName)) itemCost := fmt.Sprintf("Cost: %d", itemStruct.Cost) - itemCategory := "Category: " + cases.Title(language.English).String(strings.ReplaceAll(itemStruct.Category.Name, "-", " ")) + itemCategory := "Category: " + styling.CapitalizeResourceName(itemStruct.Category.Name) docStyle := lipgloss.NewStyle(). Padding(1, 2). diff --git a/cmd/move/move.go b/cmd/move/move.go index 2642ff5e..9d0b796b 100644 --- a/cmd/move/move.go +++ b/cmd/move/move.go @@ -61,7 +61,7 @@ func MoveCommand() (string, error) { } func moveInfoContainer(output *strings.Builder, moveStruct structs.MoveJSONStruct, moveName string) { - capitalizedMove := cases.Title(language.English).String(strings.ReplaceAll(moveName, "-", " ")) + capitalizedMove := styling.CapitalizeResourceName(moveName) docStyle := lipgloss.NewStyle(). Padding(1, 2). diff --git a/cmd/pokemon/pokemon.go b/cmd/pokemon/pokemon.go index 01068e27..00a4eb9d 100644 --- a/cmd/pokemon/pokemon.go +++ b/cmd/pokemon/pokemon.go @@ -83,7 +83,7 @@ func PokemonCommand() (string, error) { return output.String(), err } - capitalizedString := cases.Title(language.English).String(strings.ReplaceAll(pokemonName, "-", " ")) + capitalizedString := styling.CapitalizeResourceName(pokemonName) entry := func(w io.Writer) { for _, entry := range pokemonSpeciesStruct.FlavorTextEntries { @@ -173,7 +173,7 @@ func PokemonCommand() (string, error) { if pokemonSpeciesStruct.EvolvesFromSpecies.Name != "" { evolvesFrom := pokemonSpeciesStruct.EvolvesFromSpecies.Name - capitalizedPokemonName := cases.Title(language.English).String(strings.ReplaceAll(evolvesFrom, "-", " ")) + capitalizedPokemonName := styling.CapitalizeResourceName(evolvesFrom) fmt.Fprintf(w, "%s %s %s", styling.ColoredBullet, "Evolves from:", capitalizedPokemonName) } else { fmt.Fprintf(w, "%s %s", styling.ColoredBullet, "Basic Pokémon") diff --git a/flags/pokemonflagset.go b/flags/pokemonflagset.go index d680f4e4..dd9dafd0 100644 --- a/flags/pokemonflagset.go +++ b/flags/pokemonflagset.go @@ -228,7 +228,7 @@ func DefenseFlag(w io.Writer, endpoint string, pokemonName string) error { for _, ability := range pokemonStruct.Abilities { abilityName := ability.Ability.Name - formattedAbilityName := cases.Title(language.English).String(strings.ReplaceAll(abilityName, "-", " ")) + formattedAbilityName := styling.CapitalizeResourceName(abilityName) if types, exists := abilityImmunities[abilityName]; exists { typeList := strings.Join(types, " and ") @@ -465,7 +465,7 @@ func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { return } - capitalizedMove := cases.Title(language.English).String(strings.ReplaceAll(moveName, "-", " ")) + capitalizedMove := styling.CapitalizeResourceName(moveName) capitalizedType := cases.Title(language.English).String(moveStruct.Type.Name) movesChan <- MoveInfo{ diff --git a/styling/styling.go b/styling/styling.go index 9299e256..79037d90 100644 --- a/styling/styling.go +++ b/styling/styling.go @@ -4,9 +4,12 @@ import ( "fmt" "image/color" "regexp" + "strings" "github.com/charmbracelet/huh" "github.com/charmbracelet/lipgloss" + "golang.org/x/text/cases" + "golang.org/x/text/language" ) var ( @@ -78,6 +81,15 @@ func StripANSI(input string) string { return ansiRegex.ReplaceAllString(input, "") } +// titleCaser is a reusable title caser for English +var titleCaser = cases.Title(language.English) + +// CapitalizeResourceName converts hyphenated resource names to title case +// Example: "strong-jaw" -> "Strong Jaw" +func CapitalizeResourceName(name string) string { + return titleCaser.String(strings.ReplaceAll(name, "-", " ")) +} + // Color To avoid unnecessary dependencies, I adapted the MakeColor function from // "github.com/lucasb-eyer/go-colorful" and implemented it using only the // standard library. Since I only needed this function, importing the entire From 59ae40aee166b32de95c940882c65252e2be9024 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 15:00:50 -0800 Subject: [PATCH 07/16] adding python ci test --- .github/workflows/go_test.yml | 4 ++-- .github/workflows/py_test.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/py_test.yml diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml index abdc6b1b..efb93b38 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/go_test.yml @@ -1,4 +1,4 @@ -name: Test +name: Golang Tests on: pull_request: @@ -13,7 +13,7 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - name: Set up Go + - name: Setup Go uses: actions/setup-go@v5 with: go-version: 1.24 diff --git a/.github/workflows/py_test.yml b/.github/workflows/py_test.yml new file mode 100644 index 00000000..f2a7c727 --- /dev/null +++ b/.github/workflows/py_test.yml @@ -0,0 +1,35 @@ +name: Python Tests + +on: + pull_request: + types: [opened, reopened, synchronize] + paths: + - 'card_data/**' + +jobs: + tests: + runs-on: ubuntu-22.04 + defaults: + run: + working-directory: card_data + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: 3.12 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + + - name: Install Dependencies + run: uv sync + + - name: Test and Run Benchmarks + uses: CodSpeedHQ/action@v4 + with: + mode: simulation + working-directory: card_data + run: pytest pipelines/tests/ -v --codspeed \ No newline at end of file From 6254263aaaa049f1a7ff9e175b59a65c2e972ae8 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 15:04:42 -0800 Subject: [PATCH 08/16] adding `uv run` --- .github/workflows/py_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/py_test.yml b/.github/workflows/py_test.yml index f2a7c727..24514324 100644 --- a/.github/workflows/py_test.yml +++ b/.github/workflows/py_test.yml @@ -32,4 +32,4 @@ jobs: with: mode: simulation working-directory: card_data - run: pytest pipelines/tests/ -v --codspeed \ No newline at end of file + run: uv run pytest pipelines/tests/ -v --codspeed \ No newline at end of file From 3d9a68153c9c5b48789ad83a586fa111c8614c98 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 15:10:15 -0800 Subject: [PATCH 09/16] updating action version --- .github/workflows/codspeed.yml | 2 +- .github/workflows/py_test.yml | 35 ---------------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 .github/workflows/py_test.yml diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 0bb12e45..7fac9e2d 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -26,7 +26,7 @@ jobs: python-version: '3.12' - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v7 - name: Install dependencies run: uv sync --dev diff --git a/.github/workflows/py_test.yml b/.github/workflows/py_test.yml deleted file mode 100644 index 24514324..00000000 --- a/.github/workflows/py_test.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Python Tests - -on: - pull_request: - types: [opened, reopened, synchronize] - paths: - - 'card_data/**' - -jobs: - tests: - runs-on: ubuntu-22.04 - defaults: - run: - working-directory: card_data - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Setup Python - uses: actions/setup-python@v6 - with: - python-version: 3.12 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - - - name: Install Dependencies - run: uv sync - - - name: Test and Run Benchmarks - uses: CodSpeedHQ/action@v4 - with: - mode: simulation - working-directory: card_data - run: uv run pytest pipelines/tests/ -v --codspeed \ No newline at end of file From 3b79629c28bb6e64b67e38bb82f63c70f307f114 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 18:52:16 -0800 Subject: [PATCH 10/16] adding AWS secret call for n8n webhook --- card_data/pipelines/sensors.py | 9 +++++---- card_data/pipelines/utils/secret_retriever.py | 11 +++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/card_data/pipelines/sensors.py b/card_data/pipelines/sensors.py index a4168e54..8707e309 100644 --- a/card_data/pipelines/sensors.py +++ b/card_data/pipelines/sensors.py @@ -1,13 +1,15 @@ import requests from dagster import DagsterRunStatus, RunStatusSensorContext, run_status_sensor +from .utils.secret_retriever import fetch_n8n_webhook_secret + @run_status_sensor(run_status=DagsterRunStatus.SUCCESS, name="discord_success_sensor") def discord_success_sensor(context: RunStatusSensorContext): context.log.info(f"Detected successful run: {context.dagster_run.run_id}") try: response = requests.post( - "https://digitalghost-dev.app.n8n.cloud/webhook/3a58517d-c027-44fa-974c-aedc0035c4f7", + fetch_n8n_webhook_secret(), json={ "job_name": context.dagster_run.job_name, "status": "SUCCESS", @@ -25,15 +27,14 @@ def discord_failure_sensor(context: RunStatusSensorContext): context.log.info(f"Detected failed run: {context.dagster_run.run_id}") try: response = requests.post( - "https://digitalghost-dev.app.n8n.cloud/webhook/3a58517d-c027-44fa-974c-aedc0035c4f7", + fetch_n8n_webhook_secret(), json={ "job_name": context.dagster_run.job_name, "status": "FAILURE", "run_id": context.dagster_run.run_id, }, timeout=10, - ) context.log.info(f"n8n response: {response.status_code}") except Exception as e: - context.log.error(f"Failed to send notification: {e}") + context.log.error(f"Failed to send notification: {e}") \ No newline at end of file diff --git a/card_data/pipelines/utils/secret_retriever.py b/card_data/pipelines/utils/secret_retriever.py index 81cd8ec6..a23eac9a 100644 --- a/card_data/pipelines/utils/secret_retriever.py +++ b/card_data/pipelines/utils/secret_retriever.py @@ -21,3 +21,14 @@ def fetch_secret() -> str: secret_dict: SupabaseSecret = json.loads(secret) return secret_dict["database_uri"] + + +def fetch_n8n_webhook_secret() -> str: + client = botocore.session.get_session().create_client("secretsmanager") + cache_config = SecretCacheConfig() + cache = SecretCache(config=cache_config, client=client) + + secret = cast(str, cache.get_secret_string("n8n_webhook")) + secret_dict: dict[str, str] = json.loads(secret) + + return secret_dict["n8n_webhook"] From ddef5ea6c3ebb421b5d3760fd792920de5cb9347 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 19:03:29 -0800 Subject: [PATCH 11/16] updating tests --- cmd/ability/ability_test.go | 5 +++++ testdata/ability-ii.golden | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 testdata/ability-ii.golden diff --git a/cmd/ability/ability_test.go b/cmd/ability/ability_test.go index 020d6c0f..1ce04961 100644 --- a/cmd/ability/ability_test.go +++ b/cmd/ability/ability_test.go @@ -31,6 +31,11 @@ func TestAbilityCommand(t *testing.T) { args: []string{"ability", "clear-body"}, expectedOutput: utils.LoadGolden(t, "ability.golden"), }, + { + name: "Ability command: beads-of-ruin", + args: []string{"ability", "beads-of-ruin"}, + expectedOutput: utils.LoadGolden(t, "ability-ii.golden"), + }, { name: "Misspelled ability name", args: []string{"ability", "bulletproff"}, diff --git a/testdata/ability-ii.golden b/testdata/ability-ii.golden new file mode 100644 index 00000000..6b9b745a --- /dev/null +++ b/testdata/ability-ii.golden @@ -0,0 +1,3 @@ +Beads of Ruin +• First introduced in generation IX +• Effect: Lowers Special Defense of all Pokémon except itself. \ No newline at end of file From b66ce30097f4998e4c646f2d156944f67e073ccc Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 19:04:31 -0800 Subject: [PATCH 12/16] moving small word formatter to `CaptializeResourceName()` (#227) --- flags/pokemonflagset.go | 26 +------------------------- styling/styling.go | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/flags/pokemonflagset.go b/flags/pokemonflagset.go index dd9dafd0..27f86040 100644 --- a/flags/pokemonflagset.go +++ b/flags/pokemonflagset.go @@ -106,32 +106,8 @@ func AbilitiesFlag(w io.Writer, endpoint string, pokemonName string) error { return err } - // Anonymous function to format ability names - formatAbilityName := func(name string) string { - exceptions := map[string]bool{ - "of": true, - "the": true, - "to": true, - "as": true, - } - - name = strings.ReplaceAll(name, "-", " ") - words := strings.Split(name, " ") - titleCaser := cases.Title(language.English) - - // Process each word - for i, word := range words { - if _, found := exceptions[strings.ToLower(word)]; found && i != 0 { - words[i] = strings.ToLower(word) - } else { - words[i] = titleCaser.String(word) - } - } - return strings.Join(words, " ") - } - for _, pokeAbility := range pokemonStruct.Abilities { - formattedName := formatAbilityName(pokeAbility.Ability.Name) + formattedName := styling.CapitalizeResourceName(pokeAbility.Ability.Name) switch pokeAbility.Slot { case 1, 2: diff --git a/styling/styling.go b/styling/styling.go index 79037d90..4b8069df 100644 --- a/styling/styling.go +++ b/styling/styling.go @@ -84,10 +84,29 @@ func StripANSI(input string) string { // titleCaser is a reusable title caser for English var titleCaser = cases.Title(language.English) +// smallWords are words that should remain lowercase in titles (unless first word) +var smallWords = map[string]bool{ + "of": true, + "the": true, + "to": true, + "as": true, +} + // CapitalizeResourceName converts hyphenated resource names to title case -// Example: "strong-jaw" -> "Strong Jaw" +// Example: "strong-jaw" -> "Strong Jaw", "sword-of-ruin" -> "Sword of Ruin" func CapitalizeResourceName(name string) string { - return titleCaser.String(strings.ReplaceAll(name, "-", " ")) + name = strings.ReplaceAll(name, "-", " ") + words := strings.Split(name, " ") + + for i, word := range words { + if _, found := smallWords[strings.ToLower(word)]; found && i != 0 { + words[i] = strings.ToLower(word) + } else { + words[i] = titleCaser.String(word) + } + } + + return strings.Join(words, " ") } // Color To avoid unnecessary dependencies, I adapted the MakeColor function from From c943f6551c4e22e399ada3f7829a05d7da36de68 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 23:55:30 -0800 Subject: [PATCH 13/16] moving `flag.Parse()` after help flag check --- cmd/ability/ability.go | 5 ++--- cmd/berry/berry.go | 5 ++--- cmd/card/card.go | 5 ++--- cmd/item/item.go | 5 ++--- cmd/move/move.go | 5 ++--- cmd/natures/natures.go | 5 ++--- cmd/pokemon/pokemon.go | 5 ++--- cmd/search/search.go | 4 ++-- cmd/speed/speed.go | 5 ++--- cmd/types/types.go | 5 ++--- 10 files changed, 20 insertions(+), 29 deletions(-) diff --git a/cmd/ability/ability.go b/cmd/ability/ability.go index a902992f..e8ec795d 100644 --- a/cmd/ability/ability.go +++ b/cmd/ability/ability.go @@ -33,13 +33,12 @@ func AbilityCommand() (string, error) { args := os.Args - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + if err := utils.ValidateAbilityArgs(args); err != nil { output.WriteString(err.Error()) return output.String(), err diff --git a/cmd/berry/berry.go b/cmd/berry/berry.go index 7e98165d..5409065b 100644 --- a/cmd/berry/berry.go +++ b/cmd/berry/berry.go @@ -30,13 +30,12 @@ func BerryCommand() (string, error) { output.WriteString(helpMessage) } - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + // Validate arguments if err := utils.ValidateBerryArgs(os.Args); err != nil { output.WriteString(err.Error()) diff --git a/cmd/card/card.go b/cmd/card/card.go index 7b16409f..3276a26c 100644 --- a/cmd/card/card.go +++ b/cmd/card/card.go @@ -26,13 +26,12 @@ func CardCommand() (string, error) { output.WriteString(helpMessage) } - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + // Validate arguments if err := utils.ValidateCardArgs(os.Args); err != nil { output.WriteString(err.Error()) diff --git a/cmd/item/item.go b/cmd/item/item.go index 1b9b6bab..52305a02 100644 --- a/cmd/item/item.go +++ b/cmd/item/item.go @@ -31,13 +31,12 @@ func ItemCommand() (string, error) { args := os.Args - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + if err := utils.ValidateItemArgs(os.Args); err != nil { output.WriteString(err.Error()) return output.String(), err diff --git a/cmd/move/move.go b/cmd/move/move.go index 9d0b796b..37792fb3 100644 --- a/cmd/move/move.go +++ b/cmd/move/move.go @@ -32,13 +32,12 @@ func MoveCommand() (string, error) { output.WriteString(helpMessage) } - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + if err := utils.ValidateMoveArgs(os.Args); err != nil { output.WriteString(err.Error()) return output.String(), err diff --git a/cmd/natures/natures.go b/cmd/natures/natures.go index da0cbc74..f12200cd 100644 --- a/cmd/natures/natures.go +++ b/cmd/natures/natures.go @@ -24,13 +24,12 @@ func NaturesCommand() (string, error) { output.WriteString(helpMessage) } - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + if err := utils.ValidateNaturesArgs(os.Args); err != nil { output.WriteString(err.Error()) return output.String(), err diff --git a/cmd/pokemon/pokemon.go b/cmd/pokemon/pokemon.go index 00a4eb9d..84c23ae6 100644 --- a/cmd/pokemon/pokemon.go +++ b/cmd/pokemon/pokemon.go @@ -49,13 +49,12 @@ func PokemonCommand() (string, error) { args := os.Args - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + err := utils.ValidatePokemonArgs(args) if err != nil { output.WriteString(err.Error()) // This is the styled error diff --git a/cmd/search/search.go b/cmd/search/search.go index 5f71a441..f67109e1 100644 --- a/cmd/search/search.go +++ b/cmd/search/search.go @@ -25,13 +25,13 @@ func SearchCommand() error { fmt.Println(helpMessage) } - flag.Parse() - if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") { flag.Usage() return nil } + flag.Parse() + if err := utils.ValidateSearchArgs(os.Args); err != nil { fmt.Println(err.Error()) return err diff --git a/cmd/speed/speed.go b/cmd/speed/speed.go index 6fe29584..b30e3f73 100644 --- a/cmd/speed/speed.go +++ b/cmd/speed/speed.go @@ -105,13 +105,12 @@ func SpeedCommand() (string, error) { output.WriteString(helpMessage) } - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + // Validate arguments if err := utils.ValidateSpeedArgs(os.Args); err != nil { output.WriteString(err.Error()) diff --git a/cmd/types/types.go b/cmd/types/types.go index 6539157a..918c1772 100644 --- a/cmd/types/types.go +++ b/cmd/types/types.go @@ -28,13 +28,12 @@ func TypesCommand() (string, error) { output.WriteString(helpMessage) } - flag.Parse() - - // Handle help flag if utils.CheckHelpFlag(&output, flag.Usage) { return output.String(), nil } + flag.Parse() + // Validate arguments if err := utils.ValidateTypesArgs(os.Args); err != nil { output.WriteString(err.Error()) From af43dfbd6f00804f7f0d77dce2e94729bff21fca Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 9 Jan 2026 23:57:14 -0800 Subject: [PATCH 14/16] fixing race condition issue --- styling/styling.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/styling/styling.go b/styling/styling.go index 4b8069df..88646a28 100644 --- a/styling/styling.go +++ b/styling/styling.go @@ -81,9 +81,6 @@ func StripANSI(input string) string { return ansiRegex.ReplaceAllString(input, "") } -// titleCaser is a reusable title caser for English -var titleCaser = cases.Title(language.English) - // smallWords are words that should remain lowercase in titles (unless first word) var smallWords = map[string]bool{ "of": true, @@ -95,6 +92,8 @@ var smallWords = map[string]bool{ // CapitalizeResourceName converts hyphenated resource names to title case // Example: "strong-jaw" -> "Strong Jaw", "sword-of-ruin" -> "Sword of Ruin" func CapitalizeResourceName(name string) string { + caser := cases.Title(language.English) + name = strings.ReplaceAll(name, "-", " ") words := strings.Split(name, " ") @@ -102,7 +101,7 @@ func CapitalizeResourceName(name string) string { if _, found := smallWords[strings.ToLower(word)]; found && i != 0 { words[i] = strings.ToLower(word) } else { - words[i] = titleCaser.String(word) + words[i] = caser.String(word) } } From 75338b56fadf1164f9b9efb92da8473723175057 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Sat, 10 Jan 2026 00:08:42 -0800 Subject: [PATCH 15/16] adding `on push` option --- .github/workflows/codspeed.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 7fac9e2d..7c08c7d2 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -1,5 +1,10 @@ name: Codspeed Benchmarks on: + push: + branches: + - main + paths: + - 'card_data/**' pull_request: types: [ opened, reopened, synchronize ] paths: From bd889d3c16cf3fb66f3eaf85dc7b34825fc659ae Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Sat, 10 Jan 2026 00:10:28 -0800 Subject: [PATCH 16/16] making `hyphenHint` a `const` --- styling/styling.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/styling/styling.go b/styling/styling.go index 88646a28..33bd823f 100644 --- a/styling/styling.go +++ b/styling/styling.go @@ -12,6 +12,10 @@ import ( "golang.org/x/text/language" ) +const ( + HyphenHint = "Use a hyphen when typing a name with a space." +) + var ( Green = lipgloss.NewStyle().Foreground(lipgloss.Color("#38B000")) Red = lipgloss.NewStyle().Foreground(lipgloss.Color("#D00000")) @@ -27,8 +31,6 @@ var ( Foreground(lipgloss.AdaptiveColor{Light: "#E1AD01", Dark: "#FFCC00"}). Render("\x1b]8;;https://docs.poke-cli.com\x1b\\docs.poke-cli.com\x1b]8;;\x1b\\") - HyphenHint = "Use a hyphen when typing a name with a space." - StyleBold = lipgloss.NewStyle().Bold(true) StyleItalic = lipgloss.NewStyle().Italic(true) StyleUnderline = lipgloss.NewStyle().Underline(true)