How manozworld/the-cca-pavilion works
Purpose and delivery model
CCA Pavilion is a scheduled static publishing pipeline for Carolina Cricket Alliance weekend cricket summaries. It collects CricClubs results and standings, derives highlights, and rewrites a self-contained GitHub Pages document at docs/index.html. There is no application server or database.
Core repository surfaces:
• Runtime implementation: scraper/scrape.py
• Input scope and league mapping: config.json
• Published artifact: docs/index.html
• Automation entry point: .github/workflows/weekly_summary.yml
Execution entry points
The primary execution command is python scraper/scrape.py, after installing dependencies from scraper/requirements.txt. The same script is invoked by the GitHub Actions workflow on a Monday schedule and can be manually dispatched in GitHub Actions.
The workflow’s durable side effect is a commit containing regenerated docs/index.html; GitHub Pages serves that directory directly. Local runs use the same output path, enabling browser preview without separate build or hosting infrastructure.
Configuration boundary
config.json defines the CricClubs club identity, URL/base-site details, season year, formats, divisions, and per-division league IDs. The scraper treats it as the source of truth for crawl scope.
Each configured format/division expands into a scrape target. Missing (null) league IDs are intentionally skipped rather than blocking the complete weekly publication. This separates league administration from scraper logic.
CricClubs ingestion stage
scraper/scrape.py is the integration boundary with CricClubs. It fetches previous-weekend matches across configured leagues, then requests relevant match scorecards and standings/points-table data.
The scraper is designed for unreliable external HTTP: scorecard requests are rate-limited and retried; failed matches can be skipped so a partial upstream failure does not prevent publication. CricClubs is the system of record; this repository persists only rendered output rather than normalized source data.
Parsing and aggregation stage
Within scraper/scrape.py, fetched scorecards are transformed into match-level data: results, batting figures, and bowling figures. The script aggregates this across the weekend to identify milestones (50s, 100s, four- and five-wicket hauls) and select overall top batter and bowler.
Standings remain division-scoped, while weekend highlights span the configured match set. This is the key domain boundary between raw per-match extraction and presentation-ready weekly summary data.
Static presentation generation
scraper/scrape.py renders the assembled summary into docs/index.html. The generated page contains the complete presentation layer—HTML, inline styling, and inline JavaScript—so the published site has no runtime API calls or backend dependency. Google Fonts are the noted external browser-side asset.
docs/index.html is both build output and deployable artifact; changes should normally be made through the generator rather than manually, because scheduled execution overwrites it.
Automation and infrastructure
.github/workflows/weekly_summary.yml supplies the hosted scheduler and execution environment. It installs the Python runtime dependencies, runs the scraper, and commits/pushes regenerated content to the repository.
GitHub Actions is therefore the orchestration runtime, GitHub repository history is the publication handoff, and GitHub Pages is the serving layer. The principal operational dependencies are GitHub Actions/Pages and CricClubs availability.
Main entry points: scrape.py Weekly summary generator · weekly_summary.yml Weekly workflow · index.html Generated summary page · config.json League scope
Components 13
Automation
- Weekly workflow · Scheduled Monday run with manual dispatch.
.github/workflows/weekly_summary.yml - Python dependencies
scraper/requirements.txt
Weekly pipeline
- League scope · Formats, divisions, and league IDs define scrape targets.
config.json - Weekly summary generator · Single runtime for ingestion, aggregation, and rendering.
scraper/scrape.py - Configured league targets · Null league IDs are skipped.
- Resilient fetch · Rate-limits and retries scorecards; failed matches may be skipped.
scraper/scrape.py - Match-level results · Results plus batting and bowling figures.
scraper/scrape.py - Weekly highlights · Weekend milestones and top performers; standings stay division-scoped.
scraper/scrape.py
Publishing
- Generated summary page · Self-contained HTML with inline CSS and JavaScript.
docs/index.html - GitHub repository history · Workflow commits regenerated page content.
- GitHub Pages · Serves the docs directory directly.
Other components
- CricClubs · System of record for matches, scorecards, and standings.
- Readers' browser · Loads Google Fonts as the only noted browser-side external asset.
Connections 14
- Weekly workflow → Python dependencies: installs
- Weekly workflow → Weekly summary generator: runs
- League scope → Configured league targets: expands
- Configured league targets → Weekly summary generator: sets crawl scope
- Weekly summary generator → Resilient fetch: uses
- Resilient fetch → CricClubs: fetches matches, scorecards, standings
- CricClubs → Match-level results: source data
- Match-level results → Weekly highlights: aggregates
- Weekly highlights → Generated summary page: renders
- Weekly summary generator → Generated summary page: writes
- Weekly workflow → GitHub repository history: commits and pushes
- Generated summary page → GitHub repository history: published content
- GitHub repository history → GitHub Pages: deployment handoff
- GitHub Pages → Readers' browser: serves