Commit critical import artifacts

This commit is contained in:
2026-04-19 13:38:52 +02:00
parent 5fcfd3e381
commit 0aac1bd734
2188 changed files with 238467 additions and 97 deletions

View File

@@ -2,12 +2,26 @@ using CommandLine;
namespace RolemasterDb.ImportTool;
[Verb("reimport-images", HelpText = "Regenerate critical table page and cell images and refresh only image metadata in SQLite.")]
[Verb("reimport-images",
HelpText = "Regenerate critical table page and cell images, with optional SQLite metadata refresh.")]
public sealed class ReimportImagesOptions
{
[Value(0, MetaName = "table", Required = true, HelpText = "The manifest slug of the critical table to refresh.")]
public string Table { get; set; } = string.Empty;
[Value(0, MetaName = "table", Required = false, HelpText = "The manifest slug of the critical table to refresh.")]
public string? Table { get; set; }
[Option('d', "db", HelpText = "Optional SQLite database path.")]
public string? DatabasePath { get; set; }
}
[Option('a', "all", Default = false, HelpText = "Refresh every enabled manifest entry instead of one table.")]
public bool All { get; set; }
[Option("update-metadata", Default = "true",
HelpText =
"Pass true or false to control whether SQLite source-image metadata is refreshed after regenerating artifacts.")]
public string UpdateMetadataText { get; set; } = "true";
public bool UpdateMetadata =>
bool.TryParse(UpdateMetadataText, out var updateMetadata)
? updateMetadata
: throw new InvalidOperationException("The --update-metadata option must be either 'true' or 'false'.");
}