#!/bin/zsh # ============================================================================= # Project : anomaly-atlas # File : web/sync-content.sh # Purpose : Snapshot the research repo into web/content/ + build-info.json # Author : Simon-Pierre Boucher # Contact : contact@spboucher.ai # Data src : hfmarketdata.io (sole data source) # Created : 2026-08-12 # Modified : 2026-08-12 # Platform : macOS / Apple Silicon (arm64) # License : All rights reserved (research code) # ============================================================================= set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" CONTENT="$REPO_ROOT/web/content" mkdir -p "$CONTENT" # NOTE: rsync applies filters in order — excludes MUST precede the broad # includes, or large artifacts slip through. rsync -a --delete \ --exclude='*.parquet' --exclude='*.duckdb' --exclude='*.log' \ --exclude='__pycache__' --exclude='.git' --exclude='.venv' \ --exclude='node_modules' --exclude='web' --exclude='data' \ --include='CLAUDE.md' --include='README.md' --include='CITATION.cff' \ --include='Makefile' --include='pyproject.toml' \ --include='research/***' --include='experiments/***' --include='benchmarks/***' \ --include='src/***' --include='tools/***' --include='results/***' \ --include='atlas/***' --include='docs/***' \ --exclude='*' \ "$REPO_ROOT/" "$CONTENT/" COMMIT=$(git -C "$REPO_ROOT" rev-parse HEAD 2>/dev/null || echo "unknown") COMMITS=$(git -C "$REPO_ROOT" rev-list --count HEAD 2>/dev/null || echo 0) cat > "$CONTENT/build-info.json" <