Commit critical import artifacts
This commit is contained in:
@@ -70,7 +70,7 @@ The current implementation supports:
|
||||
|
||||
The current implementation does not yet support:
|
||||
|
||||
- OCR/image-based PDFs such as `Void.pdf`
|
||||
- full OCR bootstrap on machines where Tesseract language data is unavailable
|
||||
- automatic confidence scoring beyond validation errors
|
||||
|
||||
## High-Level Architecture
|
||||
@@ -381,15 +381,18 @@ Example:
|
||||
dotnet run --project .\src\RolemasterDb.ImportTool\RolemasterDb.ImportTool.csproj -- import slash
|
||||
```
|
||||
|
||||
### `reimport-images <table>`
|
||||
### `reimport-images [table]`
|
||||
|
||||
Reuses `source.xml`, regenerates page PNGs and cell PNGs, rewrites the JSON artifacts, and refreshes only source-image metadata in SQLite.
|
||||
Reuses the extracted source artifact, regenerates page PNGs and cell PNGs, rewrites the JSON artifacts, and optionally refreshes source-image metadata in SQLite.
|
||||
|
||||
For OCR-backed tables, `--update-metadata false` also enables a database-provenance fallback: if the OCR source artifact cannot be regenerated in the current environment, the command can still repopulate the committed page and cell PNGs from the existing `SourceImagePath` and `SourceImageCropJson` values stored in SQLite.
|
||||
|
||||
Use this when:
|
||||
|
||||
- crop resolution or render settings changed
|
||||
- you want better source images without reloading result text
|
||||
- you want to keep curated and uncurated content untouched while refreshing artifacts
|
||||
- you need to repopulate the committed artifact tree without touching the database
|
||||
|
||||
Example:
|
||||
|
||||
@@ -397,6 +400,19 @@ Example:
|
||||
dotnet run --project .\src\RolemasterDb.ImportTool\RolemasterDb.ImportTool.csproj -- reimport-images slash
|
||||
```
|
||||
|
||||
Refresh all enabled manifest entries without modifying SQLite metadata:
|
||||
|
||||
```powershell
|
||||
dotnet run --project .\src\RolemasterDb.ImportTool\RolemasterDb.ImportTool.csproj -- reimport-images --all --update-metadata false
|
||||
```
|
||||
|
||||
Command options:
|
||||
|
||||
- pass a table slug to refresh one enabled manifest entry
|
||||
- pass `--all` to refresh every enabled manifest entry
|
||||
- `--update-metadata` defaults to `true`; set it to `false` when you only want to regenerate committed artifacts
|
||||
- when `--update-metadata false` is used, OCR tables may fall back to existing SQLite source-image metadata to regenerate page and cell PNGs without changing the database
|
||||
|
||||
## Manifest
|
||||
|
||||
The importer manifest is stored at:
|
||||
@@ -425,7 +441,7 @@ For the currently enabled entries:
|
||||
|
||||
Artifacts are written under:
|
||||
|
||||
- `artifacts/import/critical/<slug>/`
|
||||
- `src/RolemasterDb.App/import-artifacts/critical/<slug>/`
|
||||
|
||||
The current artifact set is:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user