From f72659740182ca443d6df6c4db523b13b3c30f07 Mon Sep 17 00:00:00 2001 From: Timerix Date: Mon, 14 Sep 2026 19:09:32 +0200 Subject: [PATCH] fixed argument parser --- ParadoxSaveParser.CLI/Program.cs | 6 +++--- .../BackgroundTasks/SaveParsingOperation.cs | 1 + ParadoxSaveParser.WebAPI/Program.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ParadoxSaveParser.CLI/Program.cs b/ParadoxSaveParser.CLI/Program.cs index bbb4e69..d990211 100644 --- a/ParadoxSaveParser.CLI/Program.cs +++ b/ParadoxSaveParser.CLI/Program.cs @@ -14,17 +14,17 @@ try string? searchQuery = null; new LaunchArgumentParser( - new LaunchArgument(["-i", "--input"], + new LaunchArgument(["i", "input"], "Set input file path", s => inputPath = s, "gamestate or zip file"), - new LaunchArgument(["-o", "--output"], + new LaunchArgument(["o", "output"], "Set output file path", s => outputPath = s, "json file [default=stdout]"), - new LaunchArgument(["-s", "--search"], + new LaunchArgument(["s", "search"], "Search in input file", s => { diff --git a/ParadoxSaveParser.WebAPI/BackgroundTasks/SaveParsingOperation.cs b/ParadoxSaveParser.WebAPI/BackgroundTasks/SaveParsingOperation.cs index 27692d7..0ffc380 100644 --- a/ParadoxSaveParser.WebAPI/BackgroundTasks/SaveParsingOperation.cs +++ b/ParadoxSaveParser.WebAPI/BackgroundTasks/SaveParsingOperation.cs @@ -76,6 +76,7 @@ public class SaveParsingOperation Dictionary parsedData; await using (var gamestateStream = PathHelper.CreateTempFile()) { + // TODO: ckeck if it is zip archive or plain text like in Search.cs using (var zipArchive = ZipFile.Open(_meta.GetSaveFilePath().Str, ZipArchiveMode.Read)) { var zipEntry = zipArchive.Entries.FirstOrDefault(e => e.Name == "gamestate"); diff --git a/ParadoxSaveParser.WebAPI/Program.cs b/ParadoxSaveParser.WebAPI/Program.cs index 25b3f2c..50db454 100644 --- a/ParadoxSaveParser.WebAPI/Program.cs +++ b/ParadoxSaveParser.WebAPI/Program.cs @@ -40,7 +40,7 @@ public static class Program #endif new LaunchArgumentParser( - new LaunchArgument(["-d", "--debug"], + new LaunchArgument(["d", "debug"], "enables debug log output to console", () => IsDebug = true) ).AllowNoArguments().ParseAndHandle(args);