about summary refs log tree commit diff
path: root/MatrixUtils.RoomUpgradeCLI/Program.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-08-11 15:14:30 +0200
committerRory& <root@rory.gay>2025-08-11 15:14:30 +0200
commit47bd54a9646c4093d638292b67974ad58d4471c4 (patch)
treed6b730833657ca4a4fcf955d149a5dbe23dca2e3 /MatrixUtils.RoomUpgradeCLI/Program.cs
parentVarious changes, room create/upgrade work (diff)
downloadMatrixUtils-47bd54a9646c4093d638292b67974ad58d4471c4.tar.xz
Room upgrade CLI, more RMU GUI work
Diffstat (limited to 'MatrixUtils.RoomUpgradeCLI/Program.cs')
-rw-r--r--MatrixUtils.RoomUpgradeCLI/Program.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/MatrixUtils.RoomUpgradeCLI/Program.cs b/MatrixUtils.RoomUpgradeCLI/Program.cs
new file mode 100644

index 0000000..64de553 --- /dev/null +++ b/MatrixUtils.RoomUpgradeCLI/Program.cs
@@ -0,0 +1,28 @@ +using LibMatrix.Services; +using LibMatrix.Utilities.Bot; +using MatrixUtils.RoomUpgradeCLI; +using MatrixUtils.RoomUpgradeCLI.Commands; + +var builder = Host.CreateApplicationBuilder(args); +builder.Services.AddRoryLibMatrixServices(); +builder.Services.AddMatrixBot(); + +if (args.Length == 0) { + Console.WriteLine("No command provided. Use 'new', 'new-upgrade', or 'import-upgrade'."); + return; +} + +builder.Services.AddSingleton<RuntimeContext>(new RuntimeContext() { + Args = args +}); + +if (args[0] == "new") + builder.Services.AddHostedService<NewFileCommand>(); +else if (args[0] == "import-upgrade") { } +else { + Console.WriteLine("Unknown command. Use 'new', 'new-upgrade', or 'import-upgrade'."); + return; +} + +var host = builder.Build(); +host.Run(); \ No newline at end of file