nonebot-plugin-sunsetbot
功能
查询Sunsetbot网站并订阅特定地区通知。
命令:
- 特定时间预报:[今天/明天][朝霞/晚霞] [地区名]
- 地名精确到市或区,需精确匹配。如:今天朝霞 上海;今天朝霞 上海-徐汇区
- 未来一天预报:火烧云 [地区名]
- 查询地区名:火烧云地区 [部分地区名]
- 每日定时提醒某地区火烧云状态:火烧云订阅 [地区名]
- 查看订阅列表:火烧云订阅 查看
- 取消订阅:火烧云订阅 [取消/删除] [地区名]
安装
pip install nonebot-plugin-sunsetbot
配置
数据库配置:
SUNSETBOT__DB_PATH:SQLite数据库的文件名。默认为sunsetbot.db。本项目使用了nonebot-plugin-localstore,数据库文件存储在其定义的plugin_data_dir下。
定时提醒配置:
SUNSETBOT__SCHEDULE_TRIGGER:APScheduler的trigger,默认为"cron"SUNSETBOT__SCHEDULE_KWARGS:设置具体的提醒方式。默认为{"hour":"14,21"},即在每天的14:00、21:00提醒(参考sunsetbot网站的数据更新说明)SUNSETBOT__SCHEDULE_TIMEZONE:APScheduler的时区,默认为东八区(即Asia/Shanghai)SUNSETBOT__SCHEDULE_GRACETIME:APScheduler的misfire_grace_time参数,默认为300SUNSETBOT__SCHEDULE_SLEEP_RANGE: 为了减轻并发负担,在定时任务唤起时随机sleep一段时间,这一项配置sleep时间的范围,单位为秒。默认为10SUNSETBOT__SCHEDULE_MESSAGE:订阅提醒时向用户发送的信息,与上一项配置对应。默认为"每日14:00和21:00"SUNSETBOT__SCHEDULE_QUALITY_THRESHOLD: 只在火烧云质量大于该值时发送提醒。默认为0.1。SUNSETBOT__SCHEDULE_BADFORCAST_MSG: 在未来一天内没有超过阈值的火烧云时发送的提醒内容。若为空则不发送消息。支持Python的格式化字符串语法,支持的变量为包括:city: 订阅的地区名
Metadata
Release files for nonebot-plugin-sunsetbot 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_sunsetbot-0.2.0.tar.gz | 6.7 kB | Without provenance | Details for nonebot_plugin_sunsetbot-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl |
Total release size: 15.9 kB
Release files / nonebot_plugin_sunsetbot-0.2.0.tar.gz
| Download URL | nonebot_plugin_sunsetbot-0.2.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fa73f4e95a78a0519f697d950d39fb66663f8a6b2fe8cdaf6f69dd2c4220ba0
|
|
BLAKE2b-256 checksum How to use checksums |
cb08d511370c338552bc08f11ec020f1391b2f2a2bef7025d61a64e8cd9c4ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.7 Windows/11
|
Release files / nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl
| Download URL | nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4112c6e856dc7ea265e970bb1c0f3d441d35ec1194d937403cb75e299246cc1e
|
|
BLAKE2b-256 checksum How to use checksums |
7f6074d9c7245c212ff491585cd3cfdd894ab572efddce145d90c5b4520c3e5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.7 Windows/11
|
Security for nonebot-plugin-sunsetbot 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.