← back to Wallco Ai
etsy bundles: scripts/generate-etsy-bundles.js groups bucket/tagged designs into bundles (by category/color/manual); --build-assets opt-in for preview cover; default metadata-only · export-etsy-digital.js also flipped to metadata-only by default (Steve 'only create file when we upload to etsy'); test PNGs purged
ae36473b6fcc9ac986470ab7b917c393e702f679 · 2026-05-28 06:53:19 -0700 · Steve Abrams
Files touched
M scripts/export-etsy-digital.jsM scripts/generate-etsy-bundles.js
Diff
commit ae36473b6fcc9ac986470ab7b917c393e702f679
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu May 28 06:53:19 2026 -0700
etsy bundles: scripts/generate-etsy-bundles.js groups bucket/tagged designs into bundles (by category/color/manual); --build-assets opt-in for preview cover; default metadata-only · export-etsy-digital.js also flipped to metadata-only by default (Steve 'only create file when we upload to etsy'); test PNGs purged
---
scripts/export-etsy-digital.js | 9 ++++++++-
scripts/generate-etsy-bundles.js | 14 +++++++++++++-
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/scripts/export-etsy-digital.js b/scripts/export-etsy-digital.js
index 111c783..ffe46ee 100644
--- a/scripts/export-etsy-digital.js
+++ b/scripts/export-etsy-digital.js
@@ -47,6 +47,11 @@ const opt = {
upscalePx: parseInt(ARG('--upscale-px', '3600'), 10),
tif: HAS('--tif'),
dryRun: HAS('--dry-run'),
+ // Steve 2026-05-28 "only create file when we upload it to etsy" — default
+ // is metadata-only (listing.json + manifest). --build-assets opts in to the
+ // ~14 MB/design PNG pipeline. Production push will spin up assets just-in-
+ // time at upload + delete after.
+ buildAssets: HAS('--build-assets'),
};
const TODAY = new Date().toISOString().slice(0, 10);
const OUT_DIR = path.join(__dirname, '..', 'data', 'etsy-exports', TODAY);
@@ -218,7 +223,9 @@ function main() {
try {
if (!d.local_path || !fs.existsSync(d.local_path)) { skipped++; console.log(` · #${d.id} skip (no local_path)`); continue; }
const folder = path.join(OUT_DIR, String(d.id));
- buildAssets(d.local_path, folder);
+ fs.mkdirSync(folder, { recursive: true });
+ // Assets deferred to Etsy-upload time. --build-assets opts in for preview.
+ if (opt.buildAssets) buildAssets(d.local_path, folder);
const title = deriveTitle(d);
const pxOut = opt.upscale ? opt.upscalePx : 1024;
diff --git a/scripts/generate-etsy-bundles.js b/scripts/generate-etsy-bundles.js
index 20268e6..d20545f 100644
--- a/scripts/generate-etsy-bundles.js
+++ b/scripts/generate-etsy-bundles.js
@@ -4,6 +4,13 @@
* (ChatGPT/Steve strategy: 20 thematic bundles beat 603 singles, easier to
* manage + higher perceived value + fewer listing fees).
*
+ * IMPORTANT (Steve 2026-05-28): assets are only created at UPLOAD time, not
+ * at bundle-grouping time. Default mode is metadata-only — listing.json +
+ * README only. Cover image + per-design files are skipped. Mac2 disk is hot
+ * and we don't want 9 GB of PNGs sitting around pre-upload. Use --build-assets
+ * to opt-in to a cover preview; the production push-to-Etsy script will
+ * spin up assets → upload → cleanup in one atomic step.
+ *
* Modes:
* --by category group by base category (split_part(category,' · ',1))
* --by color cluster by dominant_hex HSL hue (8 hue buckets)
@@ -57,6 +64,7 @@ const opt = {
bundleName: ARG('--bundle-name', null),
ids: ARG('--ids', '').split(',').map(s => parseInt(s, 10)).filter(Number.isFinite),
commit: HAS('--commit'),
+ buildAssets: HAS('--build-assets'), // opt-in PNG generation (preview only)
};
const TODAY = new Date().toISOString().slice(0, 10);
const OUT_DIR = path.join(__dirname, '..', 'data', 'etsy-exports', TODAY, 'bundles');
@@ -283,7 +291,11 @@ function main() {
for (const b of bundles) {
try {
const folder = path.join(OUT_DIR, b.slug);
- const n = buildBundleAssets(b, b.designs, folder);
+ fs.mkdirSync(folder, { recursive: true });
+ // Assets are deferred to Etsy-upload time (Steve "only create file when
+ // we upload it to etsy" 2026-05-28). --build-assets opts in to a cover
+ // preview; production push will spin up assets just-in-time.
+ const n = opt.buildAssets ? buildBundleAssets(b, b.designs, folder) : b.designs.length;
const copy = bundleCopy(b.name, n, b.designs);
const ids = b.designs.map(d => d.id);
const listing = {
← 8c77b4c seam-debug: replace PIL band-blur with Replicate SDXL-inpain
·
back to Wallco Ai
·
cactus-curator: 'By-base layout' is now an INDEX-PAGE mode ( 54a491e →