← back to Apartmentwallpaper
snapshot before refactor pass
5ca72fe5b5801eef747b7c053d90d1e8c6d60427 · 2026-05-25 20:45:30 -0700 · SteveStudio2
Files touched
M scripts/pull-from-shopify.js
Diff
commit 5ca72fe5b5801eef747b7c053d90d1e8c6d60427
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date: Mon May 25 20:45:30 2026 -0700
snapshot before refactor pass
---
scripts/pull-from-shopify.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/scripts/pull-from-shopify.js b/scripts/pull-from-shopify.js
index 7aea3e2..d55d6dd 100644
--- a/scripts/pull-from-shopify.js
+++ b/scripts/pull-from-shopify.js
@@ -5,6 +5,8 @@
const https = require('https');
const fs = require('fs');
const path = require('path');
+const { classifyAesthetic } = require('../../_shared/microsite-aesthetic');
+const SITE_CFG_RAILS = (() => { try { return require('../site.config.json').rails || []; } catch { return []; } })();
const NICHE_TAG = /\b(removable|peel[\s-]?and[\s-]?stick|peel[\s-]?stick|self[\s-]?adhesive|easy[\s-]?up|repositionable|renter)\b/i;
const NICHE_TITLE = /\b(removable|peel[\s-]?and[\s-]?stick|peel[\s-]?stick|self[\s-]?adhesive|easy[\s-]?up|repositionable|renter)\b/i;
@@ -47,6 +49,12 @@ function aestheticOf(tags, title) {
return 'removable';
}
+function classifyForSite(tags, title) {
+ const railsMatch = classifyAesthetic(tags, SITE_CFG_RAILS);
+ if (railsMatch && railsMatch !== 'all') return railsMatch;
+ return aestheticOf(tags, title);
+}
+
(async () => {
const all = [];
for (let page = 1; page <= 30; page++) {
@@ -85,7 +93,7 @@ function aestheticOf(tags, title) {
published_at: p.published_at || p.created_at || '',
image_url: p.images[0].src,
tags: p.tags || [],
- aesthetic: aestheticOf(p.tags, p.title),
+ aesthetic: classifyForSite(p.tags, p.title),
product_url: `https://designerwallcoverings.com/products/${p.handle}`,
}));
← cc0357e retag aesthetic from PG: 1 rows updated
·
back to Apartmentwallpaper
·
redact vendor names from customer-facing /api (close fleet l d20d1e4 →