Use XML geometry for critical PDF import

This commit is contained in:
2026-03-14 01:25:43 +01:00
parent f70d610c92
commit 719355da90
10 changed files with 335 additions and 201 deletions

View File

@@ -2,18 +2,34 @@ namespace RolemasterDb.ImportTool;
public sealed class ImportArtifactPaths
{
private ImportArtifactPaths(string directoryPath, string extractedTextPath)
private ImportArtifactPaths(
string directoryPath,
string xmlPath,
string fragmentsJsonPath,
string parsedCellsJsonPath,
string validationReportPath)
{
DirectoryPath = directoryPath;
ExtractedTextPath = extractedTextPath;
XmlPath = xmlPath;
FragmentsJsonPath = fragmentsJsonPath;
ParsedCellsJsonPath = parsedCellsJsonPath;
ValidationReportPath = validationReportPath;
}
public string DirectoryPath { get; }
public string ExtractedTextPath { get; }
public string XmlPath { get; }
public string FragmentsJsonPath { get; }
public string ParsedCellsJsonPath { get; }
public string ValidationReportPath { get; }
public static ImportArtifactPaths Create(string artifactsRootPath, string tableSlug)
{
var directoryPath = Path.Combine(artifactsRootPath, tableSlug);
return new ImportArtifactPaths(directoryPath, Path.Combine(directoryPath, "extracted.txt"));
return new ImportArtifactPaths(
directoryPath,
Path.Combine(directoryPath, "source.xml"),
Path.Combine(directoryPath, "fragments.json"),
Path.Combine(directoryPath, "parsed-cells.json"),
Path.Combine(directoryPath, "validation-report.json"));
}
}