-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathiRingo.WeatherKit.plugin
39 lines (33 loc) · 3.59 KB
/
iRingo.WeatherKit.plugin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!name = iRingo:WeatherKit
#!desc = 1.解锁全部天气功能;2.替换空气质量数据;3.添加下一小时降水数据。仅支持iOS 18 & macOS 15 & watchOS 11 及以上版本。
#!openUrl = http://boxjs.com/#/app/iRingo.WeatherKit
#!author = VirgilClyne[/~https://github.com/VirgilClyne], WordlessEcho[/~https://github.com/WordlessEcho]
#!tag = 功能增强
#!system =
#!system_version =
#!loon_version = 3.2.6(821)
#!homepage = https://NSRingo.github.io/guide/Weather/weather-kit
#!icon = https://raw.githubusercontent.com/sooyaaabo/Loon/main/Icon/App-Icon/AppleWeather.png
#!date = 2025-02-04 17:00
# 2024-12-10 04:32:17 v1.9.4
# /~https://github.com/NSRingo/WeatherKit/releases/latest/download/iRingo.WeatherKit.plugin
[Argument]
NextHour.Provider = select, "ColorfulClouds", "WeatherKit", "QWeather", tag = [未来一小时降水强度]数据源,desc = 始终会使用选定的数据源,填补无降水监测地区的数据。
AQI.Provider = select, "ColorfulClouds", "WeatherKit", "QWeather", "WAQI", tag = [空气质量]数据源,desc = 始终会使用选定的数据源,填补无空气质量监测地区的数据。
AQI.ReplaceProviders = input, "", tag = [空气质量]需要替换的供应商,desc = 选中的空气质量数据源会被替换。
AQI.Local.Scale = select, "WAQI_InstantCast", "NONE", tag = [空气质量]本地替换算法, desc = 本地替换时使用的算法
AQI.Local.ReplaceScales = input, "", tag = [空气质量]需要修改的标准, desc = 选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。
AQI.Local.ConvertUnits = switch, false, true, tag = [空气质量]转换污染物计量单位, desc = 将污染物数据替换为转换单位后的数据,方便对照转换后的标准。(不推荐。不同单位互转可能会损失精度,导致数值偏大)
API.ColorfulClouds.Token = input, "", tag = [API]彩云天气 API 令牌, desc = 彩云天气 API 令牌
API.QWeather.Host = select, "devapi.qweather.com", "api.qweather.com", tag = [API]和风天气 API 主机, desc = 和风天气 API 使用的主机名
API.QWeather.Token = input, "", tag = [API]和风天气 API 令牌, desc = 和风天气 API 令牌
API.WAQI.Token = input, "", tag = [API]WAQI API 令牌, desc = WAQI API 令牌,填写此字段将自动使用WAQI高级API
LogLevel = select, "WARN", "OFF", "ERROR", "INFO", "DEBUG", "ALL", tag = [调试] 日志等级, desc = 选择脚本日志的输出等级,低于所选等级的日志将全部输出。
[Rule]
DOMAIN, weather-analytics-events.apple.com, REJECT-DROP
DOMAIN-SUFFIX, tthr.apple.com, REJECT-DROP
[Script]
http-response ^https?:\/\/weatherkit\.apple\.com\/api\/v1\/availability\/ script-path = /~https://github.com/NSRingo/WeatherKit/releases/latest/download/response.bundle.js, requires-body = true, tag = WeatherKit.api.v1.availability.response, argument=[{NextHour.Provider},{AQI.Provider},{AQI.ReplaceProviders},{AQI.Local.Scale},{AQI.Local.ReplaceScales},{AQI.Local.ConvertUnits},{API.ColorfulClouds.Token},{API.QWeather.Host},{API.QWeather.Token},{API.WAQI.Token},{LogLevel}]
http-response ^https?:\/\/weatherkit\.apple\.com\/api\/v2\/weather\/ script-path = /~https://github.com/NSRingo/WeatherKit/releases/latest/download/response.bundle.js, requires-body = true, binary-body-mode = true, tag = WeatherKit.api.v2.weather.response, argument=[{NextHour.Provider},{AQI.Provider},{AQI.ReplaceProviders},{AQI.Local.Scale},{AQI.Local.ReplaceScales},{AQI.Local.ConvertUnits},{API.ColorfulClouds.Token},{API.QWeather.Host},{API.QWeather.Token},{API.WAQI.Token},{LogLevel}]
[MitM]
hostname = weatherkit.apple.com