← back to Dw Yolo Loop

scripts/artmura-onboard/README.md

44 lines

# Artmura onboarding (newwall.com/collections/artmura)

Full-monte feed-first capture of the **Artmura** brand as resold on **newwall.com** (a Shopify store).
161 products, 325 images, full per-product spec tables.

## What this is
Artmura is an Italian non-woven wallcovering brand. newwall.com is a **reseller** of it.
This package captures Artmura's full Artmura collection for DW onboarding.

## Files
| Path | What |
|---|---|
| `onboard.py` | Capture: feed → parse → per-PDP spec table → download images → `data/artmura.json`. `--write-db` refreshes `newwall_catalog`. `--no-images` skips image download. |
| `fill_specs.py` | Backoff-aware sequential filler for any PDP spec tables missed by the concurrent run (newwall rate-limits at ~6 concurrent). |
| `data/artmura.json` | Structured master package (161 products). |
| `../../.newwall-ref/artmura/images/` | All 325 product images (`<SKU>-<n>.jpg`), gitignored. |

## Fields captured per product
`mfr_sku` (ARC553…), `pattern_series` (Architecture, Composizione, Materia…), `color`,
`collection_book` (Opera / La Scala Milano), `tags`, `price_newwall_retail`, `sample_price`,
`sold_by` (Yard), `substrate` (Non-Woven), `grade` (Residential), `dimensions` (39" wide),
`width_inches`, `wall_coverage` (10.5 sq.ft/yd), `lead_time` (3-4 weeks), `origin` (Made in Italy),
`body_html`, `product_url`, `handle`, `shopify_source_id`, `images[]`, `local_images[]`.

## ⚠️ Pricing gate (HARD RULE)
`price_newwall_retail` ($235–360/yd) is **newwall.com's retail markup — NOT our Artmura wholesale cost.**
Newwall is the "$4.25 mess" vendor (0% cost coverage in dw_unified). Per the standing
`scraper-must-confirm-cost-and-discount` rule, **no Shopify push** happens until Steve provides
Artmura **wholesale cost + confirmed trade discount**. Then DW retail = `cost / 0.65 / 0.85`
(or MAP where applicable). Until then these stay staged in `newwall_catalog` with `on_shopify=false`.

## DB target
Refreshes the 161 existing `newwall_catalog` rows (vendor_name='Artmura'), keyed by `handle`.
Before this run those rows were garbled (`color_name='Sample'`, `collection='A'`, sample price stored
as retail). This onboarder rewrites them clean from the authoritative live feed. Cost/trade columns
are left NULL (not fabricated).

## Re-run
```sh
python3 scripts/artmura-onboard/onboard.py            # capture + images
python3 scripts/artmura-onboard/fill_specs.py         # backfill any missed specs
python3 scripts/artmura-onboard/onboard.py --no-images --write-db   # refresh DB
```