#!/usr/bin/env tsx /** * Bahrain Law MCP -- Census Script (Full Corpus Scraper) * * Enumerates ALL laws and decree-laws from legalaffairs.gov.bh * (Legislation and Legal Opinion Commission / هيئة التشريع والرأي القانوني) * * Strategy: * 1. GET /Legislation/Search to obtain a CSRF token + session cookie * 2. Use curl to POST /legislation/search with TypeID="K" (laws & decree-laws) * paginating 50 items per page through all pages * 3. Parse each result to extract: HTM code, title (Arabic), year, number * 4. Also include the Constitution (special entry S0102) * 5. Write data/census.json with the full enumeration * * Usage: * npx tsx scripts/census.ts # Full scrape * npx tsx scripts/census.ts --limit 100 # First 100 only * npx tsx scripts/census.ts --dry-run # Show count only * * License: Government Publication */ export {}; //# sourceMappingURL=census.d.ts.map