← back to Fentucci Naturals
daily import cadence: 245/day tranche script + launchd com.steve.fentucci-import-cadence (Steve-approved std-cadence rollout)
bae363cf4fdf7de01005a04baf824f35777e4504 · 2026-07-22 19:03:07 -0700 · Steve Abrams
Files touched
A scripts/cadence-import.sh
Diff
commit bae363cf4fdf7de01005a04baf824f35777e4504
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 22 19:03:07 2026 -0700
daily import cadence: 245/day tranche script + launchd com.steve.fentucci-import-cadence (Steve-approved std-cadence rollout)
---
scripts/cadence-import.sh | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/scripts/cadence-import.sh b/scripts/cadence-import.sh
new file mode 100755
index 0000000..cea4187
--- /dev/null
+++ b/scripts/cadence-import.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# Daily cadence tranche for the Fentucci Naturals (Tokiwa) draft import.
+# Steve-approved 2026-07-22: "run on std cadence with other lines".
+# 245 products/run (490 variants) = half the 1k/day variant budget, shared
+# with the other lines' import jobs. Resumable via data/created.jsonl —
+# exits 0 with a no-op once all 504 are created.
+set -u
+ROOT="$HOME/Projects/fentucci-naturals"
+LOG="$ROOT/logs/cadence-import.log"
+mkdir -p "$ROOT/logs"
+# grep-export, never `source` — an unquoted value in the secrets .env aborts set -a sourcing
+SHOPIFY_ADMIN_TOKEN=$(grep '^SHOPIFY_ADMIN_TOKEN=' "$HOME/Projects/secrets-manager/.env" | cut -d= -f2- | tr -d '"')
+export SHOPIFY_ADMIN_TOKEN
+{
+ echo "=== fentucci cadence tranche $(date '+%Y-%m-%d %H:%M:%S') ==="
+ created=$(wc -l < "$ROOT/data/created.jsonl" 2>/dev/null || echo 0)
+ total=$(wc -l < "$ROOT/data/shopify-drafts.jsonl")
+ if [ "$created" -ge "$total" ]; then
+ echo "all $total drafts created — nothing to do"
+ else
+ cd "$ROOT" && python3 scripts/create-drafts.py --limit 245
+ fi
+ echo "=== done $(date '+%Y-%m-%d %H:%M:%S') — $(wc -l < "$ROOT/data/created.jsonl" 2>/dev/null || echo 0)/$total created ==="
+} >> "$LOG" 2>&1
← ab35a39 FIX 1 residue: sync specs.pattern jsonb to renamed towns (23
·
back to Fentucci Naturals
·
fix 422: custom.material metafield type matches store defini c566116 →