🦀 ClawHub
Hong Kong MTR Next-Train ETA | 港鐵實時到站預報
by @tomfong
Fast, reliable, and token-efficient Hong Kong MTR next-train ETA lookup with fuzzy station matching and bilingual output (zh-HK/en). Use for queries like nex...
TERMINAL
clawhub install hk-mtr-next-train📖 About This Skill
name: hk-mtr-next-train description: Fast, reliable, and token-efficient Hong Kong MTR next-train ETA lookup with fuzzy station matching and bilingual output (zh-HK/en). Use for queries like next train / ETA / arrival time at station(s), including multi-station requests. 港鐵實時到站資訊,支援站名容錯、多線查詢、同方向多總站拆分等功能。 metadata: {"openclaw":{"emoji":"🚈","requires":{"bins":["python3"]},"keywords":["mtr", "hong kong mtr","mtr eta","next train","arrival time","real-time mtr","港鐵","香港鐵路","到站時間","下一班","列車"],"locale":["zh-HK","en"],"category":"transport","quality":{"latency":"1-5s","fallback":true,"fuzzyMatch":true,"multiRoute":true},"securityNotes":{"purpose":"Read-only ETA query + local cache refresh for HK MTR data","allowedDomains":["opendata.mtr.com.hk","rt.data.gov.hk"],"writeScope":["scripts/mtr_lines_and_stations.csv","scripts/__pycache__/"],"noSecrets":true}}} user-invocable: true
Hong Kong MTR Next Train (v1.0.1)
Post-Install Recommendation
Recommend to run once after install to sync station dictionary:
cd {skill_dir}/scripts
python3 sync_mtr_stations.py
Data Refresh Rule
cd {skill_dir}/scripts
python3 sync_mtr_stations.py
Allowed Commands
python3 scripts/mtr_eta.py {STATION_NAME} {LINE_NAME(optional)} {LANG(optional)} {TO_STATION(optional)}python3 scripts/sync_mtr_stations.pySafety Scope
https://rt.data.gov.hk/*
- https://opendata.mtr.com.hk/*
scripts/mtr_lines_and_stations.csv
- scripts/__pycache__/
Language Handling
TCENFeatures
Usage
Output Policy
ETA wording
即將到達 / Arriving即將離開 / Departing已離開 / DepartedStation output format (default)
tc: 🚈 {站名}的列車班次如下:
- en: 🚈 Next trains at {Station}:
{LineName} {LineEmoji}--------------====================tc:
- • {月台}號月台|往{總站}
- {ETA1}、{ETA2}、{ETA3}、{ETA4}
- en:
- • Platform {N} | to {Destination}
- {ETA1}, {ETA2}, {ETA3}, {ETA4}
Line emoji mapping
Source footer
tc: 資料來源:開放數據平台
- en: Source: DATA GOV HKFallback
If no result after matching/retry:tc: {站名} @ {線路}:尾班車已過或未有班次資料en: {Station} @ {Line}: Service hours have passed / No information found