Add debug flag, fix description in help text

This commit is contained in:
Matt Nadareski
2024-10-24 20:42:59 -04:00
parent 5bd6ecd88c
commit c25dfbe292
3 changed files with 24 additions and 9 deletions

View File

@@ -17,6 +17,11 @@ namespace Headerer
/// </summary>
public Feature Feature { get; private set; } = Feature.NONE;
/// <summary>
/// Output debug statements to console
/// </summary>
public bool Debug { get; private set; } = false;
/// <summary>
/// Optional output directory
/// </summary>
@@ -71,6 +76,11 @@ namespace Headerer
string arg = args[index];
switch (arg)
{
case "-dbg":
case "--debug":
options.Debug = true;
break;
case "-o":
case "--outdir":
options.OutputDir = index + 1 < args.Length ? args[++index] : string.Empty;
@@ -120,10 +130,11 @@ namespace Headerer
Console.WriteLine();
Console.WriteLine("Common options:");
Console.WriteLine("-?, -h, --help Display this help text and quit");
Console.WriteLine("-dbg, --debug Enable debug logging statements");
Console.WriteLine("-o, --outdir [PATH] Set output directory");
Console.WriteLine();
Console.WriteLine("Extraction options:");
Console.WriteLine("-nsh, --no-store-header Set output path for extraction (required)");
Console.WriteLine("-nsh, --no-store-header Don't store the extracted header");
}
}
}