#!/bin/bash

# Script to demonstrate link-to-footnote conversion using the example file

set -e

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"

# Change to project root
cd "$PROJECT_ROOT"

echo "🔗 Wasot Links to Footnotes Demo"
echo "================================"
echo ""
echo "This demo shows how Wasot automatically converts URI links to footnotes."
echo "Processing: examples/links_demo.wasot"
echo ""

# Run the links-demo command with the example file
cargo run --bin wasot -- links-demo examples/links_demo.wasot

echo ""
echo "✅ Demo complete!"