china-weather

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

中国城市天气查询

Chinese City Weather Query

通过 wttr.in 查询中国各城市天气信息,支持中文城市名输入,附带农历日期和生活建议。
Query weather information of various cities in China via wttr.in, supports input of Chinese city names, and comes with lunar calendar dates and life advice.

功能概述

Feature Overview

  • 实时天气: 通过 curl 调用 wttr.in 获取天气数据
  • 中文城市名: 支持直接输入"深圳"、"北京"等中文名
  • 多日预报: 支持当天及未来 3 天天气预报
  • 农历日期: 自动附带当天农历日期信息
  • 生活指数: 穿衣建议、出行提示、紫外线指数
  • Real-time Weather: Fetch weather data by calling wttr.in via curl
  • Chinese City Names: Supports direct input of Chinese names like "Shenzhen", "Beijing"
  • Multi-day Forecast: Supports weather forecast for the current day and the next 3 days
  • Lunar Calendar Date: Automatically includes the lunar calendar date of the current day
  • Living Index: Dressing advice, travel tips, UV index

查询方式

Query Methods

使用 Bash 工具执行以下命令格式:
bash
undefined
Use Bash tool to execute the following command formats:
bash
undefined

基础查询(中文输出)

Basic query (Chinese output)

curl -s "wttr.in/深圳?lang=zh"
curl -s "wttr.in/深圳?lang=zh"

精简单行格式

Simplified single-line format

curl -s "wttr.in/深圳?format=3&lang=zh"
curl -s "wttr.in/深圳?format=3&lang=zh"

仅今天的天气

Only today's weather

curl -s "wttr.in/深圳?0&lang=zh"
curl -s "wttr.in/深圳?0&lang=zh"

JSON 格式(便于解析)

JSON format (easy to parse)

curl -s "wttr.in/深圳?format=j1"
undefined
curl -s "wttr.in/深圳?format=j1"
undefined

使用示例

Usage Examples

查天气

Check Weather

深圳今天天气怎么样?
What's the weather like in Shenzhen today?

出行建议

Travel Advice

明天要去杭州出差,需要带伞吗?
I'm going on a business trip to Hangzhou tomorrow, do I need to bring an umbrella?

多城市对比

Multi-city Comparison

北京和上海这周末天气哪个好?想出去玩
Which city has better weather this weekend, Beijing or Shanghai? I want to go out and play.

穿衣建议

Dressing Advice

广州现在多少度?穿什么衣服合适?
What's the temperature in Guangzhou now? What clothes are suitable to wear?

适用场景

Applicable Scenarios

  • 快速查询国内任意城市天气
  • 出差/旅行前了解目的地天气
  • 需要穿衣或出行建议
  • 查看未来几天天气趋势
  • 终端环境下无法打开天气 App 时
  • Quickly query weather for any city in China
  • Understand the destination weather before business trips/travels
  • Need dressing or travel advice
  • Check weather trends for the next few days
  • When unable to open weather apps in terminal environment

不适用场景

Inapplicable Scenarios

  • 需要精确到小时的天气预报(wttr.in 精度有限)
  • 查询历史天气数据
  • 需要灾害预警等官方气象信息(请使用中国气象局官网)
  • 查询海外城市天气(本技能优化了中国城市名映射)
  • Need hourly-precise weather forecast (wttr.in has limited precision)
  • Query historical weather data
  • Need official meteorological information such as disaster warnings (please use the official website of China Meteorological Administration)
  • Query weather for overseas cities (this skill optimizes Chinese city name mapping)

城市名映射

City Name Mapping

常见城市直接使用拼音或中文均可:
  • 北京 → Beijing / 北京
  • 上海 → Shanghai / 上海
  • 深圳 → Shenzhen / 深圳
  • 广州 → Guangzhou / 广州
如遇查询失败,尝试使用城市拼音替代中文名。
Common cities can be accessed via pinyin or Chinese names:
  • 北京 → Beijing / 北京
  • 上海 → Shanghai / 上海
  • 深圳 → Shenzhen / 深圳
  • 广州 → Guangzhou / 广州
If query fails, try using pinyin instead of Chinese city names.

注意事项

Notes

  • wttr.in 为免费服务,偶尔可能响应较慢
  • 温度默认摄氏度,风速默认 km/h
  • 数据来源为 WorldWeatherOnline,仅供参考
  • wttr.in is a free service, and may occasionally respond slowly
  • Temperature is in Celsius by default, wind speed is in km/h by default
  • Data source is WorldWeatherOnline, for reference only