COLLABTUNES BATCH AIO RENDER PIPELINE
DEPLOYMENT WORKFLOW GUIDE — 5_13_26
================================================================

FOLDER STRUCTURE
----------------
COLLABTUNES_PIPELINE/
  json/           ← PUT YOUR JSON FILES HERE
  templates/      ← HTML template lives here
  output/         ← GENERATED PAGES GO HERE (auto-created)
  assets/         ← CSS, images, fonts (future use)
  BATCH_RENDER_AND_VALIDATE_5_13_26.py   ← Run this
  JSON_TO_AIO_RENDER_ENGINE_5_13_26.py   ← Engine (don't touch)
  RENDER_ENGINE_VALIDATOR_5_13_26.py     ← Validator (don't touch)


HOW TO RUN THE PIPELINE
-----------------------
From inside the COLLABTUNES_PIPELINE/ folder:

  python BATCH_RENDER_AND_VALIDATE_5_13_26.py \
    --template templates/AIO_RENDER_TEMPLATE_5_13_26.html \
    --output-dir output

That's it. The engine:
  1. Finds all SAMPLE_*.json files in current directory
  2. Validates each one
  3. Renders passing files to /output
  4. Logs everything to BATCH_RENDER_REPORT_5_13_26.txt

To target specific JSON files:
  python BATCH_RENDER_AND_VALIDATE_5_13_26.py json/MY_RELEASE.json --output-dir output


HOW JSON NAMING WORKS
---------------------
Name your JSON files clearly. The output HTML inherits the name:

  json/SAMPLE_G_OPEN_FIELDS_5_13_26.json
    → output/SAMPLE_G_OPEN_FIELDS_5_13_26_AIO_PAGE.html

  json/MY_NEW_RELEASE_5_13_26.json
    → output/MY_NEW_RELEASE_5_13_26_AIO_PAGE.html

RULE: No spaces. Use underscores. Always end with date stamp.


HOW OUTPUT FOLDERS WORK
------------------------
/output is auto-created on first run.
Each render drops one .html file per JSON input.
Files are overwritten on re-render — safe to re-run.
Keep /output clean. Don't manually edit files in /output.
If you need to edit, edit the JSON and re-render.


HOW TO ADD A NEW COLLECTION
----------------------------
1. Copy any existing JSON from /json as your starting point
2. Edit: title, artist, tracks, rating, gx_score, summaries, metadata
3. Save as: json/SAMPLE_[RATING]_[TITLE]_5_13_26.json
4. Run the batch render
5. Check /output for the new page
6. Check BATCH_RENDER_REPORT for pass/fail

Required JSON fields (engine will fail without these):
  title, collection_type, artist, rating, gx_score,
  summaries, tracks, tags, nav_links, metadata


HOW TO DEPLOY GENERATED PAGES TO YOLA
--------------------------------------
Yola is a drag-and-drop site builder. Generated HTML pages
are self-contained and deploy cleanly.

OPTION A — Embed as iFrame (simplest)
  1. Open your Yola page editor
  2. Add an HTML widget / embed block
  3. Paste: <iframe src="YOUR_PAGE_URL" width="100%" height="900px" frameborder="0"></iframe>
  4. Host the generated HTML file on any static host
     (GitHub Pages, Netlify, Yola File Manager)

OPTION B — Upload HTML directly to Yola File Manager
  1. In Yola dashboard → File Manager
  2. Upload the generated .html file from /output
  3. Note the public URL Yola assigns it
  4. Link to it from your main nav or collection pages
  5. Each AIO page lives at its own URL

OPTION C — Copy HTML content into Yola HTML block
  1. Open generated .html in a text editor
  2. Copy everything between <body> and </body>
  3. In Yola editor, add an HTML block
  4. Paste body content
  5. Note: fonts load from Google Fonts CDN — requires internet

RECOMMENDED FOR COLLABORHYTHM: Option B
  Cleanest URLs, full page control, no iframe constraints.


SAFE RE-RENDER RULES
---------------------
- Always edit JSON, never edit /output HTML directly
- Re-running batch is always safe — files overwrite cleanly
- Template changes apply to ALL pages on next render
- Keep a /json backup before bulk edits
- Run batch after every template change to verify nothing broke


TROUBLESHOOTING
---------------
Page looks wrong:
  → Check JSON for missing fields
  → Run validator: python RENDER_ENGINE_VALIDATOR_5_13_26.py
  → Check BATCH_RENDER_REPORT for warnings

Engine crashes:
  → Check JSON is valid (paste into jsonlint.com)
  → Confirm template file is in /templates
  → Check Python version is 3.7+

Yola page blank:
  → Confirm HTML file uploaded successfully
  → Check browser console for font load errors (safe to ignore)
  → Try Option C (body paste) as fallback

================================================================
COLLABTUNES BATCH AIO RENDER PIPELINE — 5_13_26
================================================================
