[object Object]

← back to Dw Validator Debug TK11314

fabricut daily-post: localize S3 image hotlinks to DW URLs before posting (TK-10823)

27789b80eed4c8fc9981f37eed667ae77b37456d · 2026-08-24 19:13:04 -0700 · Steve

Pre-step runs fabricut-landing/scripts/localize-images.js --apply so any newly-
scraped vendor-S3 rows are localized to DW public URLs before daily-post pushes
image_url to Shopify. Idempotent + merge-safe. Stops the S3-hotlink recurrence.

Files touched

Diff

commit 27789b80eed4c8fc9981f37eed667ae77b37456d
Author: Steve <steve@designerwallcoverings.com>
Date:   Mon Aug 24 19:13:04 2026 -0700

    fabricut daily-post: localize S3 image hotlinks to DW URLs before posting (TK-10823)
    
    Pre-step runs fabricut-landing/scripts/localize-images.js --apply so any newly-
    scraped vendor-S3 rows are localized to DW public URLs before daily-post pushes
    image_url to Shopify. Idempotent + merge-safe. Stops the S3-hotlink recurrence.
---
 DW-Programming/fabricut-daily-post.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/DW-Programming/fabricut-daily-post.sh b/DW-Programming/fabricut-daily-post.sh
new file mode 100755
index 00000000..2c363919
--- /dev/null
+++ b/DW-Programming/fabricut-daily-post.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+export SHOPIFY_ADMIN_TOKEN=$(grep -E '^SHOPIFY_ADMIN_TOKEN=' "$HOME/Projects/secrets-manager/.env" | head -1 | cut -d= -f2-)
+export PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
+
+# TK-10823 — STOP THE S3-HOTLINK RECURRENCE. Newly-scraped Fabricut rows (from the
+# import tool at :9830) land with vendor-S3 image_url/all_images. The microsite +
+# Shopify daily-post both require LOCAL images (rule: images ALWAYS local). So BEFORE
+# posting, localize any S3 hotlink to a DW public URL (idempotent: rows already on the
+# DW domain are skipped, only NEW S3 rows are downloaded + rewritten). This guarantees
+# daily-post never pushes a vendor-S3 URL to Shopify again.
+/opt/homebrew/bin/node "$HOME/Projects/fabricut-landing/scripts/localize-images.js" --apply >> /tmp/fabricut-daily-post.log 2>&1
+
+cd "$HOME/Projects/Designer-Wallcoverings/DW-Programming"
+/opt/homebrew/bin/node fabricut-daily-post.js >> /tmp/fabricut-daily-post.log 2>&1

← ecb9c68b auto-data-snapshot: 2026-08-24T13:59:29 (2 data files) — DW-  ·  back to Dw Validator Debug TK11314  ·  TK-10796: Fabricut 'Yards yards' double-unit remediation (au cebd4580 →