#!/usr/bin/env tsx /** * Bahrain Law MCP -- Census-Driven Ingestion Pipeline * * Reads data/census.json and fetches + parses every ingestable law * from legalaffairs.gov.bh (Word-generated HTML). * * Features: * - Resume support: skips laws that already have a seed JSON file * - Census update: writes provision counts + ingestion dates back to census.json * - Rate limiting: 500ms minimum between requests (via fetcher.ts) * - Checkpoint: saves census every 50 laws * * Usage: * npm run ingest # Full census-driven ingestion * npm run ingest -- --limit 5 # Test with 5 laws * npm run ingest -- --skip-fetch # Reuse cached HTML (re-parse only) * npm run ingest -- --force # Re-ingest even if seed exists * npm run ingest -- --resume # Same as default (skip existing seeds) * * Data source: legalaffairs.gov.bh (Legislation and Legal Opinion Commission) * Format: Word-generated HTML (MsoNormal) * License: Government Open Data */ export {}; //# sourceMappingURL=ingest.d.ts.map