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
@@ -0,0 +1,27 @@
|
||||
require('dotenv').config();
|
||||
const pool = require('../server/db');
|
||||
const { loadPainterPalette, findPaletteRow } = require('./painter-palette-lib');
|
||||
|
||||
async function main() {
|
||||
const palette = loadPainterPalette();
|
||||
const { rows: dbArtists } = await pool.query('SELECT name FROM artists ORDER BY name');
|
||||
|
||||
let matched = 0;
|
||||
const unmatched = [];
|
||||
for (const a of dbArtists) {
|
||||
if (findPaletteRow(a.name, palette)) matched += 1;
|
||||
else unmatched.push(a.name);
|
||||
}
|
||||
|
||||
console.log('CSV rows:', palette.rowCount);
|
||||
console.log('DB artists:', dbArtists.length);
|
||||
console.log('Matched to PainterPalette:', matched, '/', dbArtists.length);
|
||||
if (unmatched.length) console.log('Unmatched:', unmatched.join('; '));
|
||||
|
||||
await pool.end();
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user