Skip to main content

SunsetBot朝霞晚霞查询

Project description

nonebot-plugin-sunsetbot

功能

查询Sunsetbot网站并订阅特定地区通知。

命令:

  • 特定时间预报:[今天/明天][朝霞/晚霞] [地区名]
    • 地名精确到市或区,需精确匹配。如:今天朝霞 上海;今天朝霞 上海-徐汇区
  • 未来一天预报:火烧云 [地区名]
  • 查询地区名:火烧云地区 [部分地区名]
  • 每日定时提醒某地区火烧云状态:火烧云订阅 [地区名]
    • 查看订阅列表:火烧云订阅 查看
    • 取消订阅:火烧云订阅 [取消/删除] [地区名]

安装

pip install nonebot-plugin-sunsetbot

配置

数据库配置:

  • SUNSETBOT__DB_PATH: SQLite数据库的文件名。默认为sunsetbot.db。本项目使用了nonebot-plugin-localstore,数据库文件存储在其定义的plugin_data_dir下。

定时提醒配置:

  • SUNSETBOT__SCHEDULE_TRIGGERAPSchedulertrigger,默认为"cron"
  • SUNSETBOT__SCHEDULE_KWARGS:设置具体的提醒方式。默认为{"hour":"14,21"},即在每天的14:00、21:00提醒(参考sunsetbot网站的数据更新说明)
  • SUNSETBOT__SCHEDULE_TIMEZONE: APScheduler的时区,默认为东八区(即Asia/Shanghai
  • SUNSETBOT__SCHEDULE_GRACETIME: APSchedulermisfire_grace_time参数,默认为300
  • SUNSETBOT__SCHEDULE_SLEEP_RANGE: 为了减轻并发负担,在定时任务唤起时随机sleep一段时间,这一项配置sleep时间的范围,单位为秒。默认为10
  • SUNSETBOT__SCHEDULE_MESSAGE:订阅提醒时向用户发送的信息,与上一项配置对应。默认为"每日14:00和21:00"
  • SUNSETBOT__SCHEDULE_QUALITY_THRESHOLD: 只在火烧云质量大于该值时发送提醒。默认为0.1
  • SUNSETBOT__SCHEDULE_BADFORCAST_MSG: 在未来一天内没有超过阈值的火烧云时发送的提醒内容。若为空则不发送消息。支持Python的格式化字符串语法,支持的变量为包括:
    • city: 订阅的地区名

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_sunsetbot-0.2.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_sunsetbot-0.2.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_sunsetbot-0.2.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.7 Windows/11

File hashes

Hashes for nonebot_plugin_sunsetbot-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2fa73f4e95a78a0519f697d950d39fb66663f8a6b2fe8cdaf6f69dd2c4220ba0
MD5 0e150fcd48b7a06dd0bd4c57d0874643
BLAKE2b-256 cb08d511370c338552bc08f11ec020f1391b2f2a2bef7025d61a64e8cd9c4ec3

See more details on using hashes here.

File details

Details for the file nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_sunsetbot-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4112c6e856dc7ea265e970bb1c0f3d441d35ec1194d937403cb75e299246cc1e
MD5 57e0c2463ed8504451c1417e2ac309b1
BLAKE2b-256 7f6074d9c7245c212ff491585cd3cfdd894ab572efddce145d90c5b4520c3e5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page