A library and CLI tool for scraping, filtering, and reporting earthquake data from KOERI (Kandilli Observatory and Earthquake Research Institute).
- CLI and API
- Advanced filtering
- JSON and Markdown support
- Zero runtime dependencies
npm install koeri-scraperimport { createApp } from 'koeri-scraper';
const app = createApp();
// Fetch all earthquakes
await app.run();
// Filter by province and generate reports
await app.run({
province: 'izmir',
generateJson: true,
generateMarkdown: true
});
// Advanced filtering
await app.runWithCustomFilters({
location: { province: 'izmir', keywords: ['torbalı'] },
magnitude: { min: 2.0, max: 5.0 },
depth: { max: 10 }
});# Install globally
npm install -g koeri-scraper
# Or use with npx
npx koeri-scraper
# Filter by province with JSON output
koeri-scraper --province izmir --json
# Filter by keywords with both outputs
koeri-scraper --keywords torbalı,dikili --json --markdown
# Combine filters
koeri-scraper --province izmir --keywords torbalı --json --verboseCreates a new EarthquakeApp instance.
interface AppOptions {
locationKeywords?: string[];
province?: string;
generateJson?: boolean;
generateMarkdown?: boolean;
}interface FilterCriteria {
location?: { keywords?: string[]; province?: string; };
magnitude?: { min?: number; max?: number; };
date?: { start?: string; end?: string; };
depth?: { min?: number; max?: number; };
}Returns parsing statistics (parsed count, errors, success rate).
--province <name>- Filter by province--keywords <list>- Filter by keywords (comma-separated)--json- Generate JSON report--markdown- Generate Markdown report--verbose,-v- Enable verbose logging--debug- Enable debug mode--no-color- Disable colored output--help,-h- Show help
For detailed documentation, examples, and advanced usage, see DOCS.md.