Skip to main content

一款自动识别提醒内容,可生成todo图片并定时推送的nonebot插件

Project description

nonebot-plugin-todo-nlp

一款自动识别提醒内容,可生成todo图片并定时推送的nonebot插件

nlp支持来源于jionlp (十分便利的nlp库)

图片生成功能来源于nonebot插件htmlrender (我们先进的的浏览器制图已经完全超越了老式的PIL制图了(不是))

插件特点:

  • 允许多样化的日期描述方法,可以在语句中包含“明天”、“9月1日”等日期提示
  • 自动识别语句中的事项

食用方法:

触发关键词:

  • 增加事项: '提醒', 'nonebot_todo'
  • 完成事项: '完成'
  • 删除事项(支持正则表达式): '删除', '去掉'
  • 修改事项时间: '更正', '改'
  • 获取图片: '获取todo'

若要强调事件名称(nlp有的时候会犯蠢,比如在示例中机器人没能识别出“中秋假期”这一关键词):使用英文双引号括上事项名称

由于nonebot使用的uvicorn框架,在windows平台使用时图片的导出可能会出现not implemented error。
解决方法:将env中的FASTAPI_RELOAD改为false!** 见nonebot-plugin-htmlrender issue#25 , 在nonebot2文档中对此亦有提及。

配置方法:

在env中添加如同以下格式的配置(多个send time则多次推送,注意时间首位去0):
在群聊中使用时,只有管理员和群主可以增删项目。

TODO_USERS=["1234567890"]
TODO_GROUPS=["1234567890"]
TODO_SEND_TIME=[{"HOUR":8,"MINUTE":0},{"HOUR":19,"MINUTE":34}]

TODO:

  • 迁移到postgre数据库
  • 增加优先级相关功能支持
  • 增加完成todo统计,对完成状况进行跟踪
  • 增加todo项目复用功能(比如每日/每周某天的提醒可以复用而不用手动再次添加)
  • 完善相关console log
  • (可能后期会加上其他的todo主题?)

示例:

1.png

2.jpg

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-todo-nlp-0.1.3.tar.gz (9.1 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_todo_nlp-0.1.3-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-todo-nlp-0.1.3.tar.gz.

File metadata

  • Download URL: nonebot-plugin-todo-nlp-0.1.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.7 Windows/10

File hashes

Hashes for nonebot-plugin-todo-nlp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b5155f171443c1597184932ed2ca3d5b7b5477095792d53c4e0d56a026c873bd
MD5 745f52925f7f037c29a5758ab779164d
BLAKE2b-256 36c242bde41e0883ba88ad9d204579afc7cc997e4faf6feb627c2d5e52cb3324

See more details on using hashes here.

File details

Details for the file nonebot_plugin_todo_nlp-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_todo_nlp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 36e83f5a6666fc416303f0bbf41072d1bb929741052cf9890cecc26a33c09f8c
MD5 f9c0225addbe943b6a5094bd1efc0396
BLAKE2b-256 8acd00bfe3d7eff25e76e0119dfa9e063ac2a5f0e378265e1e8aaa41e3e654bf

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