#!/bin/bash
# Run all new analysis features (refs, trends, idea-overlap) and generate reports.
# Usage: bash scripts/run-new-analyses.sh

set -e

echo "=== Extracting cross-references ==="
python -m src.ietf_analyzer.cli refs --extract

echo ""
echo "=== Top Referenced RFCs ==="
python -m src.ietf_analyzer.cli refs --top 20

echo ""
echo "=== Top Referenced Drafts ==="
python -m src.ietf_analyzer.cli refs --type draft --top 15

echo ""
echo "=== Category Trends ==="
python -m src.ietf_analyzer.cli trends

echo ""
echo "=== Cross-Org Idea Overlap ==="
python -m src.ietf_analyzer.cli idea-overlap

echo ""
echo "=== Generating Reports ==="
python -m src.ietf_analyzer.cli report refs
python -m src.ietf_analyzer.cli report trends
python -m src.ietf_analyzer.cli report idea-overlap

echo ""
echo "Done! Reports saved to data/reports/"
