Skip to content

Commit c7785cd

Browse files
authored
Add startup art to seeder utility (#7045)
1 parent ba1d1b8 commit c7785cd

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

util/SeederUtility/Program.cs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,89 @@ public class Program
77
{
88
private static int Main(string[] args)
99
{
10+
PrintBanner();
11+
1012
return new AppRunner<Program>()
1113
.Run(args);
1214
}
1315

16+
private static void PrintBanner()
17+
{
18+
var brightGreen = "\x1b[92m";
19+
var green = "\x1b[32m";
20+
var brown = "\x1b[38;2;128;60;30m";
21+
var cyan = "\x1b[36m";
22+
var bold = "\x1b[1m";
23+
var reset = "\x1b[0m";
24+
25+
// Art sections: leaves (bright green), stem (green), seed (brown)
26+
(string Color, string Art)[] sections =
27+
[
28+
(brightGreen, """
29+
...........
30+
..::------==:.
31+
..-----=====+-.
32+
..----======+=-.
33+
.--==+=======-.
34+
.-===========...
35+
.------:::... ..=+=======-...
36+
.-=====-----:. .:=:.........
37+
.-+=======----...:=..
38+
.-=======+==--..=:....
39+
..===========:=-.....
40+
.:========+=+:..
41+
....:----:-=:..
42+
"""),
43+
(green, """
44+
..:=:.
45+
.+:
46+
.=-..
47+
.-=.....
48+
.:=:....
49+
..=:.
50+
--.
51+
"""),
52+
(brown, """
53+
...-======:..:-...=#####*-..
54+
..:====--=======-=+##*******###-.
55+
.==------=======**************###:
56+
.==----=======+***************#####.
57+
.:+========++*****************######-
58+
..##************************########.
59+
:*###*****************###########:.
60+
..-#########***################=..
61+
.:*######################*-..
62+
..-=+*###########*=-.....
63+
.................
64+
"""),
65+
];
66+
67+
var allLines = sections
68+
.SelectMany(s => s.Art.Split('\n'))
69+
.Where(l => !string.IsNullOrWhiteSpace(l));
70+
var minIndent = allLines.Min(l => l.Length - l.TrimStart().Length);
71+
72+
Console.WriteLine();
73+
foreach (var (color, art) in sections)
74+
{
75+
foreach (var line in art.Split('\n'))
76+
{
77+
if (string.IsNullOrWhiteSpace(line))
78+
{
79+
continue;
80+
}
81+
82+
Console.WriteLine($"{color}{line[minIndent..]}{reset}");
83+
}
84+
}
85+
86+
Console.WriteLine();
87+
Console.WriteLine($" {bold}{cyan}╔══════════════════════════════╗{reset}");
88+
Console.WriteLine($" {bold}{cyan}║ SEEDER UTILITY ║{reset}");
89+
Console.WriteLine($" {bold}{cyan}╚══════════════════════════════╝{reset}");
90+
Console.WriteLine();
91+
}
92+
1493
[Subcommand]
1594
public OrganizationCommand Organization { get; set; } = null!;
1695

0 commit comments

Comments
 (0)