← 返回
AI智能 中文

Earthquake Monitor

🌋 Real-time earthquake monitoring for China, Taiwan, and Japan. CENC/CWA/JMA data with proactive alerting. v1.1.1 - Multi-language (zh/en/ja), pinyin locati...
实时监测中国、台湾、日本地震,CENC/CWA/JMA数据,主动预警;v1.1.1支持多语言(中文/英文/日文),拼音地名。
fungjcode
AI智能 clawhub v1.1.1 2 版本 99876.8 Key: 无需
★ 1
Stars
📥 791
下载
💾 17
安装
2
版本
#latest

概述

🌋 Earthquake Monitor v1.1.1

Real-time earthquake monitoring for China (CENC), Taiwan (CWA), and Japan (JMA) with proactive alerting.

v1.1.1 Changelog

v1.1.1 (Security Fix)

  • 🔒 Security Update - Removed encryption for ClawHub compatibility
  • 📝 Added SECURITY.md documentation

v1.1.0 Features

  • 🌍 Multi-language Support - Alert messages in Chinese, English, and Japanese
  • 📍 Location Fuzzy Matching - Supports pinyin (dali), abbreviations (DL), partial match (da)
  • Performance Optimization - Shared cache module with auto-cleanup
  • Fixed Taiwan (CWA) data source integration
  • Improved notification deduplication logic

Quick Start

// Initialize monitoring
await init({ location: "大理" })

// Get latest earthquakes
await getAll()

// Start proactive monitoring
await start()

Data Sources

SourceRegionLanguage (Alert)Description
-----------------------------------------------
CENC🇨🇳 China中文China Earthquake Networks Center
CWA🇹🇼 Taiwan中文Central Weather Administration
JMA🇯🇵 Japan日本語Japan Meteorological Agency

API Reference

init(options)

Initialize configuration.

await init({
  location: "dali",           // City name (supports pinyin, abbreviations)
  distanceThreshold: 300,     // Alert distance in km
  minMagnitude: 3.0,         // Minimum magnitude
  language: 'zh',            // Language: zh/en/ja
  sources: {                // Toggle data sources
    CENC: true,
    JMA: true,
    CWA: true
  }
})

getAll(options)

Get earthquakes from all sources.

const result = await getAll({ limit: 5 })
// Returns: { earthquakes, totalCount, nearbyEarthquakes, hasAlert, alertMessage }

getCENC(limit)

Get China earthquake data.

const { earthquakes } = await getCENC(10)

getJMA(limit)

Get Japan earthquake data.

const { earthquakes } = await getJMA(10)

getCWA()

Get Taiwan earthquake early warning data.

const { earthquakes, isWarning } = await getCWA()

start(options)

Start proactive monitoring with auto-alerts.

await start({ interval: 60000 })  // Check every 60 seconds

stop()

Stop monitoring.

await stop()

config(newConfig)

View or update configuration.

// View
const cfg = await config()

// Update
await config({ language: 'en', minMagnitude: 4.0 })

cities()

List all supported cities with coordinates.

const { cities } = await cities()

Configuration Options

OptionTypeDefaultDescription
------------------------------------
locationstring/object大理City name or {name, latitude, longitude}
distanceThresholdnumber300Alert distance in km
minMagnitudenumber3.0Minimum earthquake magnitude
languagestringzhAlert language: zh/en/ja
sources.CENCbooleantrueEnable China data
sources.JMAbooleantrueEnable Japan data
sources.CWAbooleantrueEnable Taiwan data
webhookstringnullEncrypted webhook URL

Supported Cities (20+)

CityPinyinAbbrCoordinates
---------------------------------
大理dali, dal, dlDL25.61°N, 100.27°E
北京beijing, bj, bBJ39.90°N, 116.40°E
上海shanghai, sh, sSH31.23°N, 121.47°E
昆明kunming, km, kKM25.04°N, 102.71°E
成都chengdu, cd, cCD30.57°N, 104.07°E
东京tokyo, dj, dDJ35.68°N, 139.69°E
............

Location Matching Examples

All these return Beijing:

await init({ location: '北京' })      // Chinese
await init({ location: 'beijing' })   // Full pinyin
await init({ location: 'bj' })        // Abbreviation
await init({ location: 'bei' })       // Partial match

Multi-Language Alerts

Alert language is automatically selected based on earthquake source:

SourceLanguageExample
---------------------------
CENC (China)中文⚠️ 地震预警提醒!
CWA (Taiwan)中文⚠️ 地震预警提醒!
JMA (Japan)日本語⚠️ 地震アラート!

Manual Language Override

// Set preferred language (applies to alert format)
await init({ language: 'en' })

// All alerts will be in English regardless of source

Alert Message Format

⚠️ Earthquake Alert!
📍 Epicenter near Dali:

1. 🔴 M7.6级 [中国地震台网]
   📍 汤加群岛
   📏 Distance: 5000km
   ⏰ 2026-03-24 12:37:50
   📊 Depth: 250km

Please stay safe!

Security

Webhook URLs are encrypted using AES-256-CBC before storing in config file:

// Set webhook (automatically encrypted)
await config({ webhook: 'https://oapi.dingtalk.com/robot/send?access_token=xxx' })

// Stored encrypted, decrypted only in memory

Performance

Shared Cache

  • Reduces redundant API calls
  • TTL-based expiration (1 minute default)
  • Auto-cleanup every 5 minutes

Parallel Fetching

  • All three data sources fetched simultaneously
  • Fast response time

Return Format

{
  timestamp: "2026-03-24T14:30:00.000Z",
  sources: [
    { source: "CENC", sourceName: "中国地震台网", count: 10, earthquakes: [...] },
    { source: "JMA", sourceName: "日本气象厅", count: 5, earthquakes: [...] }
  ],
  earthquakes: [...],      // Merged, sorted by time
  totalCount: 15,
  nearbyEarthquakes: [...], // Within distanceThreshold
  hasAlert: true/false,
  alertMessage: "..."       // Formatted alert string
}

Notes

  • 🌐 Data from official government agencies (CENC/CWA/JMA)
  • 🔑 No API key required
  • 📡 WebSocket + HTTP fallback
  • 🔄 Auto-retry on failure

Support

  • Author: fungjcode
  • GitHub: https://github.com/fungjcode/earthquake-monitor
  • Report issues at: https://github.com/fungjcode/earthquake-monitor/issues

版本历史

共 2 个版本

  • v1.1.1 当前
    2026-05-01 04:27 安全 安全
  • v1.0.0
    2026-03-31 00:55 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,362 📥 318,703
ai-intelligence

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 418 📥 115,281
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 837 📥 213,279