Turn WhatsApp band chats into lightweight static sites for band operations, creative work, and public promo pages.
bandchat2sitePython package with shared modules and three pipelines:ops,creative, andpublic.- OpenAI Responses API helpers (
call_llm_text/call_llm_json) using the official SDK. - WhatsApp export parser to convert
.txtexports intomessages.json. - Simple CLI:
bandchat2site ops|creative|public|parse-whatsapp.
- Install Python 3.11+ and dependencies:
pip install -r requirements.txt
- Configure OpenAI credentials:
export OPENAI_API_KEY=sk-... # Optional: override the model (defaults to gpt-4o-mini) export OPENAI_MODEL=gpt-4o-mini
python -m bandchat2site parse-whatsapp --input chat.txt --output messages.jsonmessages.json will contain objects shaped like { "ts": "2024-04-01T19:30:00", "author": "Ada", "text": "Great rehearsal" }.
Use the same messages.json for each pipeline. Outputs are written to a folder with index.html and section pages.
# Operational hub
python -m bandchat2site ops --messages messages.json --out site_ops --title "Band Ops Hub"
# Creative hub
python -m bandchat2site creative --messages messages.json --out site_creative --title "Band Creative Hub"
# Public/promo site
python -m bandchat2site public --messages messages.json --out site_public --title "Band"Run the bundled smoke test (uses stubbed LLM responses, no API calls):
python -m unittest tests.test_smoke- The LLM helpers use strict JSON schema enforcement for structured extraction.
- Phone numbers, emails, and obviously sensitive lines are redacted before prompting.
- The generated HTML is minimal and self-contained for easy sharing or hosting.