1
0
mirror of https://github.com/bitwarden/server synced 2026-02-20 11:23:37 +00:00

Add startup art to seeder utility (#7045)

This commit is contained in:
Matt Bishop
2026-02-20 02:06:45 -05:00
committed by GitHub
parent ba1d1b851f
commit c7785cd491

View File

@@ -7,10 +7,89 @@ public class Program
{
private static int Main(string[] args)
{
PrintBanner();
return new AppRunner<Program>()
.Run(args);
}
private static void PrintBanner()
{
var brightGreen = "\x1b[92m";
var green = "\x1b[32m";
var brown = "\x1b[38;2;128;60;30m";
var cyan = "\x1b[36m";
var bold = "\x1b[1m";
var reset = "\x1b[0m";
// Art sections: leaves (bright green), stem (green), seed (brown)
(string Color, string Art)[] sections =
[
(brightGreen, """
...........
..::------==:.
..-----=====+-.
..----======+=-.
.--==+=======-.
.-===========...
.------:::... ..=+=======-...
.-=====-----:. .:=:.........
.-+=======----...:=..
.-=======+==--..=:....
..===========:=-.....
.:========+=+:..
....:----:-=:..
"""),
(green, """
..:=:.
.+:
.=-..
.-=.....
.:=:....
..=:.
--.
"""),
(brown, """
...-======:..:-...=#####*-..
..:====--=======-=+##*******###-.
.==------=======**************###:
.==----=======+***************#####.
.:+========++*****************######-
..##************************########.
:*###*****************###########:.
..-#########***################=..
.:*######################*-..
..-=+*###########*=-.....
.................
"""),
];
var allLines = sections
.SelectMany(s => s.Art.Split('\n'))
.Where(l => !string.IsNullOrWhiteSpace(l));
var minIndent = allLines.Min(l => l.Length - l.TrimStart().Length);
Console.WriteLine();
foreach (var (color, art) in sections)
{
foreach (var line in art.Split('\n'))
{
if (string.IsNullOrWhiteSpace(line))
{
continue;
}
Console.WriteLine($"{color}{line[minIndent..]}{reset}");
}
}
Console.WriteLine();
Console.WriteLine($" {bold}{cyan}╔══════════════════════════════╗{reset}");
Console.WriteLine($" {bold}{cyan}║ SEEDER UTILITY ║{reset}");
Console.WriteLine($" {bold}{cyan}╚══════════════════════════════╝{reset}");
Console.WriteLine();
}
[Subcommand]
public OrganizationCommand Organization { get; set; } = null!;