{"id":50126929,"url":"https://github.com/saitogo555/eew-discord-notify","last_synced_at":"2026-05-23T20:05:07.281Z","repository":{"id":357155519,"uuid":"1235568251","full_name":"saitogo555/eew-discord-notify","owner":"saitogo555","description":"P2PQuakeのWebScoketとDiscord Webhookを使った緊急地震速報をDiscordに通知するシステム","archived":false,"fork":false,"pushed_at":"2026-05-11T14:24:37.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T16:29:50.725Z","etag":null,"topics":["discord","eew","p2pquake","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saitogo555.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T12:56:50.000Z","updated_at":"2026-05-11T14:28:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saitogo555/eew-discord-notify","commit_stats":null,"previous_names":["saitogo555/eew-discord-notify"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/saitogo555/eew-discord-notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitogo555%2Feew-discord-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitogo555%2Feew-discord-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitogo555%2Feew-discord-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitogo555%2Feew-discord-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saitogo555","download_url":"https://codeload.github.com/saitogo555/eew-discord-notify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitogo555%2Feew-discord-notify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33410392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T18:09:33.147Z","status":"ssl_error","status_checked_at":"2026-05-23T18:09:31.380Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","eew","p2pquake","webhook"],"created_at":"2026-05-23T20:05:00.676Z","updated_at":"2026-05-23T20:05:07.265Z","avatar_url":"https://github.com/saitogo555.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eew-discord-notify\n\nP2P地震情報のWebSocket APIを受信し、Discord Webhookに地震情報を通知するシステムです。\n\n## 特徴\n\n- P2P地震情報のWebSocketを監視。\n- Discord WebhookへEmbed形式で通知。\n- ProductionモードとSandboxモードの2種類を切り替え可能。\n- Sandboxモード時は通知タイトルに `[Sandbox Mode]` が付与される。\n- MIN_SCALEで通知する震度閾値を調整。\n- Docker Composeで簡単に起動。\n\n## 動作要件\n\n- Docker\n- Docker Compose\n\n## 環境変数\n\n| 変数名 | 必須 | 既定値 | 説明 |\n|---|---|---:|---|\n| PRODUCTION | いいえ | false | trueのとき本番WebSocketを使用 |\n| P2PQUAKE_WS_URL | いいえ | 自動選択 | 明示指定時はこのURLを優先 |\n| MIN_SCALE | いいえ | 本番=40 / Sandbox=-1 | 通知する最小震度（値については下記参照） |\n| DISCORD_WEBHOOK_URL | はい | - | Discord Webhook URL |\n\n### MIN_SCALE の指定値\n\n| 値 | 対応する震度 |\n|---:|---|\n| -1 | 不明（すべて通知） |\n| 10 | 震度1以上 |\n| 20 | 震度2以上 |\n| 30 | 震度3以上 |\n| 40 | 震度4以上 |\n| 45 | 震度5弱以上未入電以上 |\n| 50 | 震度5弱以上 |\n| 55 | 震度5強以上 |\n| 60 | 震度6弱以上 |\n| 65 | 震度6強以上 |\n| 70 | 震度7のみ |\n\n## 接続先\n\n- Production: `wss://api.p2pquake.net/v2/ws`\n- Sandbox: `wss://api-realtime-sandbox.p2pquake.net/v2/ws`\n\n## 使い方\n\n### 1. リポジトリをクローン\n\n```sh\ngit clone https://github.com/saitogo555/eew-discord-notify\n```\n\n### 2. compose.ymlを編集\n\n最低でも `DISCORD_WEBHOOK_URL` を設定してください。\n\n```yaml\nenvironment:\n  PRODUCTION: \"true\"\n  MIN_SCALE: \"40\"\n  DISCORD_WEBHOOK_URL: \"https://discord.com/api/webhooks/xxxxx/yyyyy\"\n```\n\n### 3. 起動\n\n```bash\ndocker compose up -d\n```\n\n### 4. ログ確認\n\n```bash\ndocker compose logs -f\n```\n\n### 5. 停止\n\n```bash\ndocker compose down\n```\n\n## 通知仕様\n\n現在の実装では、P2P地震情報のコード551のメッセージを対象にし、MIN_SCALE未満の震度は通知しません。\n\nSandboxモード（`PRODUCTION=false`）で動作している場合は、通知のタイトルに `[Sandbox Mode]` が付与されます。\n\n同一イベントの重複通知を避けるため、簡易的な重複判定も入れています。\n\n## ライセンス\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaitogo555%2Feew-discord-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaitogo555%2Feew-discord-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaitogo555%2Feew-discord-notify/lists"}