返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
y

yr-weather

Fetch weather forecasts from the Norwegian Meteorological Institute (MET) using the yr.no API. Use when the user asks for weather information, forecasts, temperature, precipitation, wind conditions, or any weather-related queries for specific locations. Supports coordinates-based lookups and returns current conditions plus forecasts. REQUIRES latitude/longitude - no defaults. See common locations table.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
323
下载量
0
收藏
概述
安装方式
版本历史

yr-weather

# Yr.no Weather Get weather forecasts from MET Norway via yr.no API (free, no key). ## Quick Start ```bash # Current weather + forecast (requires lat/lon) python3 {baseDir}/scripts/weather.py <lat> <lon> [altitude] # Examples from common locations: python3 {baseDir}/scripts/weather.py -33.9288 18.4174 # Cape Town python3 {baseDir}/scripts/weather.py -33.8688 151.2093 # Sydney python3 {baseDir}/scripts/weather.py 51.5074 -0.1278 # London # Tomorrow's summary (requires lat/lon) python3 {baseDir}/scripts/tomorrow.py <lat> <lon> # Run tests python3 -m unittest discover {baseDir}/tests ``` ## Tests - Unit tests mock API calls (no network). - Sample data in `scripts/tests/data/`. - Run: `cd {baseDir}/scripts && python3 ../tests/test_*.py` ## Common Locations | City | Lat | Lon | |---------------|-----------|-----------| | Cape Town | -33.9288 | 18.4174 | | Johannesburg | -26.2041 | 28.0473 | | Durban | -29.8587 | 31.0218 | | Sydney | -33.8688 | 151.2093 | | London | 51.5074 | -0.1278 | | New York | 40.7128 | -74.0060 | | Tokyo | 35.6762 | 139.6503 | ## Structure ``` scripts/ ├── yr_service.py # API calls (tested/mocked) ├── utils.py # Emoji/symbol helpers ├── weather.py # Current + forecast CLI ├── tomorrow.py # Tomorrow summary CLI └── tests/data/ # Sample JSON tests/ ├── test_weather.py └── test_service.py ``` ## Standalone Repo Install via pip: `pip install git+https://github.com/brandoncrabpi/yr-weather.git` - `yr-weather -33.9288 18.4174` - Tagged: v1.0.0 ## Usage Terms - User-Agent required (included). - Cache 10min+ per location. - Credit: "Data from MET Norway". Refactored for production: no defaults, tests, modular service.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 yr-weather-1776299239 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 yr-weather-1776299239 技能

通过命令行安装

skillhub install yr-weather-1776299239

下载 Zip 包

⬇ 下载 yr-weather v1.0.0

文件大小: 8.61 KB | 发布时间: 2026-4-16 18:15

v1.0.0 最新 2026-4-16 18:15
Initial release: Fetch accurate weather forecasts via the MET Norway yr.no API.

- Fetches current weather and multi-day forecasts using latitude/longitude (coordinates required; no defaults).
- Includes CLI scripts for general and tomorrow's weather.
- Mocked unit tests for offline validation.
- Predefined table of common locations for reference.
- Modular code structure for easy maintenance and extension.
- Caching and proper attribution per MET usage guidelines.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部