Add PainterPalette integration, canonical DB schema, and influence UI fixes.
Integrate Inputs/PainterPalette.csv for artist metadata and influence links, add db/schema.sql with server/migrate.js, letterbox influence panel thumbnails, and refresh Titian/Pontormo images. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
4eead54062
commit
b2cae284ac
@@ -322,6 +322,51 @@ These live in `client/public/` (and `client/dist/` after build).
|
||||
5. Run `npm run fetch-images -- --artist="…"` or rely on preload / on-demand sync.
|
||||
6. Add influence rows via `npm run update-influences` / `art-influences-data.js` (writes both `painting_influence_sources` and legacy painting edges).
|
||||
|
||||
## PainterPalette external dataset
|
||||
|
||||
`Inputs/PainterPalette.csv` is a curated dataset (~10,000 painters) merging WikiArt, Art500k, and Wikidata with cleaned influence fields. The gallery integrates it **for existing DB artists only** (not a full catalog import).
|
||||
|
||||
### One-time setup
|
||||
|
||||
```bash
|
||||
npm run migrate:artist-palette # adds artists.palette_metadata JSONB
|
||||
npm run import-painter-palette # enrich + influence links
|
||||
```
|
||||
|
||||
### What gets imported
|
||||
|
||||
| PainterPalette column | Gallery use |
|
||||
|-----------------------|-------------|
|
||||
| Nationality, gender, styles, birth/death places, occupations, … | Stored in `artists.palette_metadata` |
|
||||
| `birth_year`, `death_year` | Fills missing DB years only |
|
||||
| `Influencedby`, `Teachers` | **Artist** or **movement** sources on that artist's paintings |
|
||||
| `Influencedon`, `Pupils` | Reverse **artist** sources on the pupil/successor's paintings |
|
||||
|
||||
Influence rows are written to `painting_influence_sources` with `discovered_via = painter-palette` and do not duplicate curated Gombrich edges (unique index + `ON CONFLICT DO NOTHING`).
|
||||
|
||||
Name matching uses normalized strings plus aliases in `scripts/painter-palette-lib.js` (e.g. `Bronzino` → `Agnolo Bronzino`, `J. M. W. Turner` → `J.M.W. Turner`). Museum names, WikiArt tags, and dimension strings are filtered out.
|
||||
|
||||
### Commands
|
||||
|
||||
```bash
|
||||
npm run analyze-painter-palette # match report
|
||||
npm run import-painter-palette -- --dry-run
|
||||
npm run import-painter-palette -- --metadata-only
|
||||
npm run import-painter-palette -- --influences-only
|
||||
```
|
||||
|
||||
Re-run `import-painter-palette` after adding gallery artists or updating the CSV; existing palette influence rows are skipped if already present.
|
||||
|
||||
## Catalog export
|
||||
|
||||
Export the full painting catalog as CSV:
|
||||
|
||||
```bash
|
||||
npm run export-paintings
|
||||
```
|
||||
|
||||
Writes **`Output/paintings.csv`** with columns `artist`, `painting`, `year` (sorted by artist, year, title). The `Output/` folder is git-ignored by convention; regenerate after catalog changes.
|
||||
|
||||
## Image fetcher overrides
|
||||
|
||||
`scripts/image-fetcher.js` includes hand-maintained overrides for ambiguous Wikipedia titles and direct URLs (e.g. works whose Commons name does not match the article title, or when museum search returns the wrong work). Extend these maps when automated resolution fails:
|
||||
|
||||
Reference in New Issue
Block a user