Files
Art-gallery/scripts/analyze-painter-palette.js
T
Danila KhodjaefandCursor b2cae284ac 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>
2026-06-22 12:09:47 +03:00

28 lines
807 B
JavaScript

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);
});