一个比较群友地区天气温度的插件
Project description
📖 介绍
简单的天气排行榜
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-weather-rank
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-weather-rank
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_weather_rank"]
💥 破坏性更新
- 若您正在使用 0.1.4 及以下版本,若需升级,则应当按照nonebot-plugin-orm 文档中的指南对数据进行删除
nb orm downgrade nonebot_plugin_wordcloud@base # 降级数据库,删除数据
- 此插件从 0.1.5 版本开始使用
tortoise-orm对数据库进行管理,移除对nonebot-plugin-orm的依赖。才不是因为 plugin-orm 的文档不全呢(x)
🎉 使用
💡 数据来源
插件配置
🔧 请在你的 bot 根目录下的.env .env.*中添加以下字段
[!TIP] 自定义字体应被放置在
<data_path>\assets\fonts目录下,其中<data_path>为nonebot-plugin-localstore所定义的data path。
| 字段 | 类型 | 默认值 | 可选值 | 描述 |
|---|---|---|---|---|
| QWEATHER_API_KEY | str | 无 | 无 | 和风天气 api key |
| QWEATHER_RANK_MODE | int | 0 | 0/1 | 调用和风天气 api 的模式,0 为免费订阅模式,1 为标准/高级订阅模式 |
| SCHEDULE_HOUR | int | 8 | 0 - 23 | 推送的时间(h) |
| SCHEDULE_MINUTE | int | 0 | 0 - 59 | 推送的时间(min) |
| SCHEDULE_SWITCH | bool | True | True/False | 全局推送开关 |
| WEACHER_CUSTOM_FONT_ZH | str | '' | '无' | 自定义中文字体 |
| WEACHER_CUSTOM_FONT_EN | str | '' | '无' | 自定义英文字体 |
✨ 功能介绍
-
添加订阅城市
-
查看已订阅城市气温/温差排行榜
-
查看某地实时气温及预报
-
查看全国气温地图(可能会有 1h 延迟)
-
获取插件帮助信息
-
订阅每日推送
🚩 TODO
- 实现付费订阅 api 相应功能
🤖 指令表
⚠️ 此处示例中的"/"为 nb 默认的命令开始标志,若您设置了另外的标志,则请使用您设置的标志作为开头
调用插件的主命令为"天气"
| 子命令 | 权限 | 需要@ | 说明 | 示例 |
|---|---|---|---|---|
| 添加/删除城市 | 无 | 无 | 在此群聊中添加/删除订阅城市 | /天气 添加/删除城市 上海 |
| 排行榜 | 无 | 无 | 查看已订阅的城市天气排行榜 | /天气 排行榜 气温/温差 |
| 当地天气 | 无 | 无 | 查看指定城市的当日天气及近 7 日天气 | /天气 当地天气 上海 |
| 气温地图 | 无 | 无 | 查看最近的时间节点全国的气温地图 | /天气 气温地图 |
| 订阅 | 无 | 无 | 订阅排行榜推送 | /天气 订阅 |
| 取消订阅 | 无 | 无 | 取消订阅排行榜推送 | /天气 取消订阅 |
| 指令 | 权限 | 需要@ | 说明 | 示例 |
|---|---|---|---|---|
| 天气帮助 | 无 | 无 | 查看此插件的帮助 | /天气帮助 |
💬 写在最后
- 对现有 ui 不满意或有所建议的话,欢迎提 issue 或 pr
这插件真的会有人用么在最后求个 star
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_weather_rank-0.1.9.tar.gz.
File metadata
- Download URL: nonebot_plugin_weather_rank-0.1.9.tar.gz
- Upload date:
- Size: 13.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83061123dff8f8a8d98265b26d7d30471b37d0cc2600161cf43b3970b0e84fe4
|
|
| MD5 |
1be27176b53125c190d3ab8838329aad
|
|
| BLAKE2b-256 |
753307ac732cc1f1f7a839ef55e6cfbfb3f86cc16e53df9d2b246686ad90e8a8
|
Provenance
The following attestation bundles were made for nonebot_plugin_weather_rank-0.1.9.tar.gz:
Publisher:
release.yml on hanasa2023/nonebot-plugin-weather-rank
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_weather_rank-0.1.9.tar.gz -
Subject digest:
83061123dff8f8a8d98265b26d7d30471b37d0cc2600161cf43b3970b0e84fe4 - Sigstore transparency entry: 176800928
- Sigstore integration time:
-
Permalink:
hanasa2023/nonebot-plugin-weather-rank@512b505819601d860f9ffaec2b8bba6610ad0ad4 -
Branch / Tag:
refs/tags/0.1.9 - Owner: https://github.com/hanasa2023
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@512b505819601d860f9ffaec2b8bba6610ad0ad4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nonebot_plugin_weather_rank-0.1.9-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_weather_rank-0.1.9-py3-none-any.whl
- Upload date:
- Size: 13.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
661798448f937603d8cab81d68c8df8184cfecef25836351aa885fc637aab84c
|
|
| MD5 |
9541a82a201fce43d9e17681d95f388b
|
|
| BLAKE2b-256 |
4ad44f271da530aff0d562af021c4d7181972c78a717164232997b7faad7cb12
|
Provenance
The following attestation bundles were made for nonebot_plugin_weather_rank-0.1.9-py3-none-any.whl:
Publisher:
release.yml on hanasa2023/nonebot-plugin-weather-rank
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_weather_rank-0.1.9-py3-none-any.whl -
Subject digest:
661798448f937603d8cab81d68c8df8184cfecef25836351aa885fc637aab84c - Sigstore transparency entry: 176800929
- Sigstore integration time:
-
Permalink:
hanasa2023/nonebot-plugin-weather-rank@512b505819601d860f9ffaec2b8bba6610ad0ad4 -
Branch / Tag:
refs/tags/0.1.9 - Owner: https://github.com/hanasa2023
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@512b505819601d860f9ffaec2b8bba6610ad0ad4 -
Trigger Event:
push
-
Statement type: