#!/bin/bash echo "=== CONABIP Scraper Status ===" echo "" # Check if process is running if pgrep -f "scrape_conabip_full.py" > /dev/null; then echo "✅ Scraper is RUNNING" echo "" # Show last 30 lines of log echo "Recent progress:" tail -30 /tmp/scraper_output.log 2>/dev/null | grep "INFO - \[" | tail -10 echo "" echo "For live updates: tail -f /tmp/scraper_output.log" else echo "⏸️ Scraper is NOT running (completed or stopped)" echo "" # Check if output files exist if [ -f "data/isil/AR/conabip_libraries_enhanced_FULL.json" ]; then echo "✅ OUTPUT FILES FOUND!" ls -lh data/isil/AR/conabip_libraries_enhanced_FULL.* echo "" # Show statistics python3 -c " import json with open('data/isil/AR/conabip_libraries_enhanced_FULL.json', 'r') as f: data = json.load(f) print(f\"Total institutions: {data['metadata']['total_institutions']}\") print(f\"With coordinates: {data['metadata'].get('institutions_with_coordinates', 'N/A')}\") print(f\"With services: {data['metadata'].get('institutions_with_services', 'N/A')}\") " 2>/dev/null else echo "❌ No output files found yet" echo "" echo "Last 20 lines of log:" tail -20 /tmp/scraper_output.log 2>/dev/null fi fi