← back to Designer Wallcoverings
Parameterize room push (CATALOG/VIEW) — serves Carl Robinson + Daisy Bennett
e4711d86187d8054f552e71debc523b4d6c59fca · 2026-07-07 10:03:52 -0700 · Steve
Files touched
M scripts/wallquest-refresh/carl-robinson-viewer/room-engines/push_rooms_shopify.cjs
Diff
commit e4711d86187d8054f552e71debc523b4d6c59fca
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jul 7 10:03:52 2026 -0700
Parameterize room push (CATALOG/VIEW) — serves Carl Robinson + Daisy Bennett
---
.../carl-robinson-viewer/room-engines/push_rooms_shopify.cjs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/wallquest-refresh/carl-robinson-viewer/room-engines/push_rooms_shopify.cjs b/scripts/wallquest-refresh/carl-robinson-viewer/room-engines/push_rooms_shopify.cjs
index f5d60508..65692566 100644
--- a/scripts/wallquest-refresh/carl-robinson-viewer/room-engines/push_rooms_shopify.cjs
+++ b/scripts/wallquest-refresh/carl-robinson-viewer/room-engines/push_rooms_shopify.cjs
@@ -9,7 +9,9 @@ const DRY = process.argv.includes('--dry-run');
const STORE = 'designer-laboratory-sandbox.myshopify.com', API = '2024-10';
const TOKEN = process.env.SHOPIFY_ADMIN_TOKEN;
const CONN = process.env.DATABASE_URL || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified';
-const VIEW = '/Users/macstudio3/Projects/Designer-Wallcoverings/scripts/wallquest-refresh/carl-robinson-viewer';
+// parameterized for any book: CATALOG table + its VIEW dir (holds rooms-local/)
+const CATALOG = process.env.CATALOG || 'carl_robinson_catalog';
+const VIEW = process.env.VIEW || '/Users/macstudio3/Projects/Designer-Wallcoverings/scripts/wallquest-refresh/carl-robinson-viewer';
const ALT_MARK = 'Phillipe Romano room setting';
const sleep = ms => new Promise(r => setTimeout(r, ms));
if (!DRY && !TOKEN) { console.error('no SHOPIFY_ADMIN_TOKEN (use --dry-run to validate)'); process.exit(1); }
@@ -26,7 +28,7 @@ function rest(method, path, body) {
}
// engine derived from the chosen room's filename (decoupled from apply_winners schema)
const engOf = room => room.includes('-kontext') ? 'kontext' : room.includes('-sdxl') ? 'sdxl' : 'gemini';
-const q = "SELECT dw_sku, shopify_product_id, COALESCE((room_setting_images::jsonb)->>0,'') FROM carl_robinson_catalog WHERE shopify_product_id IS NOT NULL ORDER BY dw_sku";
+const q = `SELECT dw_sku, shopify_product_id, COALESCE((room_setting_images::jsonb)->>0,'') FROM ${CATALOG} WHERE shopify_product_id IS NOT NULL ORDER BY dw_sku`;
const rows = execSync(`psql "${CONN}" -tAc "${q}"`, { encoding: 'utf8' }).trim().split('\n').filter(Boolean)
.map(l => { const [sku, pid, room] = l.split('|'); return { sku, pid, room, eng: engOf(room || '') }; });
← 1d7baf73 Parameterize real-sample composite (CATALOG/VIEW/OUTDIR) + r
·
back to Designer Wallcoverings
·
Alan Campbell: reclassify wallcovering->fabric (type/title/t 55858e64 →