← back to Flockedwallpaper
color-summary.js
23 lines
const data = require('./flocked-products.json');
console.log('=== FLOCKED WALLPAPER COLLECTION - SORTED BY COLOR ===\n');
const byColor = {};
data.forEach(p => {
if (!byColor[p.primaryColor]) byColor[p.primaryColor] = [];
byColor[p.primaryColor].push(p);
});
const colorOrder = ['Black', 'White', 'Red', 'Pink', 'Purple', 'Blue', 'Green', 'Aqua', 'Yellow', 'Orange', 'Brown', 'Beige', 'Gray', 'Neutral', 'Other'];
colorOrder.forEach(color => {
if (byColor[color]) {
console.log(`${color.toUpperCase()} (${byColor[color].length} products)`);
byColor[color].slice(0, 3).forEach(p => console.log(` - ${p.title.substring(0, 70)}`));
if (byColor[color].length > 3) console.log(` ... and ${byColor[color].length - 3} more\n`);
else console.log('');
}
});
console.log(`\nTOTAL: ${data.length} flocked wallpaper products, sorted by color families`);