nonebot-plugin-mail 0.7.0__tar.gz → 0.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/PKG-INFO +41 -7
  2. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/README.md +39 -5
  3. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/__init__.py +0 -1
  4. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail.egg-info/PKG-INFO +41 -7
  5. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/pyproject.toml +2 -2
  6. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/LICENSE +0 -0
  7. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/config.py +0 -0
  8. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/constants.py +0 -0
  9. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/data/__init__.py +0 -0
  10. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/data/fallback_contacts.py +0 -0
  11. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/data/fallback_contacts_privacy.py +0 -0
  12. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/__init__.py +0 -0
  13. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/mail.py +0 -0
  14. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/query.py +0 -0
  15. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/receive.py +0 -0
  16. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/recognize.py +0 -0
  17. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/send.py +0 -0
  18. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/handlers/utils.py +0 -0
  19. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/models.py +0 -0
  20. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/__init__.py +0 -0
  21. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/contacts.py +0 -0
  22. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/images.py +0 -0
  23. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/matcher.py +0 -0
  24. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/notion.py +0 -0
  25. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/recognizer.py +0 -0
  26. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/render.py +0 -0
  27. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail/services/rules.py +0 -0
  28. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail.egg-info/SOURCES.txt +0 -0
  29. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail.egg-info/dependency_links.txt +0 -0
  30. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail.egg-info/requires.txt +0 -0
  31. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/nonebot_plugin_mail.egg-info/top_level.txt +0 -0
  32. {nonebot_plugin_mail-0.7.0 → nonebot_plugin_mail-0.7.2}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-mail
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: QQ 邮件登记机器人插件,支持 Notion 邮件登记、查询、签收和群聊信封图片智能识别。
5
5
  Author-email: lhc <2743218818@qq.com>
6
6
  License: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/WhyPilotXia/nonebot_plugin_mail
8
- Requires-Python: >=3.10
8
+ Requires-Python: >=3.9
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
11
  Requires-Dist: nonebot2>=2.0.0
@@ -20,7 +20,7 @@ QQ 邮件登记机器人插件
20
20
 
21
21
  一个基于 NoneBot2 + OneBot v11 的 QQ 机器人文件夹插件,用于管理“寄信 / 查件 / 签收 / 联系人表 / 邮件记录表”,并将数据同步到 Notion。
22
22
 
23
- 版本:0.7.0
23
+ 版本:0.7.2
24
24
 
25
25
  本版本将原 `mail_v7.py` 单文件插件重构为 `nonebot_plugin_mail/` 文件夹插件,并把叶恩杰项目的信封图片智能识别能力整合为群聊命令流程。
26
26
 
@@ -56,13 +56,11 @@ QQ 邮件登记机器人插件
56
56
 
57
57
  ## 配置
58
58
 
59
- 在 NoneBot 2环境配置.env或.env.dev中设置:
60
-
59
+ 在 NoneBot 2 环境配置 `.env` 或 `.env.dev` 中设置:
60
+ ### 示例
61
61
  ```env
62
62
  NOTION_TOKEN=
63
- NOTION_VERSION=2025-09-03
64
63
  RAS_DATA_SOURCE_ID=31e70d82-c716-80ba-b4d2-000b1892f62c
65
- RAS_DATABASE_ID=31e70d82-c716-80d3-9f2d-e73dcc4033b3
66
64
  CONTACT_DATA_SOURCE_ID=31e70d82-c716-8034-b23d-000ba20878af
67
65
  AI_BASE_URL=https://api.exesim.com/v1
68
66
  AI_API_KEY=
@@ -70,6 +68,42 @@ AI_MODEL=Qwen3.6-Plus
70
68
  MAIL_IMAGE_MAX_COUNT=12
71
69
  ```
72
70
 
71
+ ### Notion 相关
72
+ | 配置项 | 必填 | 默认值 | 说明 |
73
+ | --- | --- | --- | --- |
74
+ | `NOTION_TOKEN` | 否,但不建议 | 无 | Notion API 访问令牌,用于读取联系人表、写入邮件记录、签收邮件记录。 |
75
+ | `RAS_DATA_SOURCE_ID` | 否,但不建议 | `31e70d82-c716-80ba-b4d2-000b1892f62c` | 邮件记录表的数据源 ID,用于查询邮件记录。 |
76
+ | `CONTACT_DATA_SOURCE_ID` | 否,但不建议 | `31e70d82-c716-8034-b23d-000ba20878af` | 联系人表的数据源 ID,用于读取联系人信息。 |
77
+
78
+ ### AI 相关
79
+ | 配置项 | 必填 | 默认值 | 说明 |
80
+ | --- | --- | --- | --- |
81
+ | `AI_BASE_URL` | 否 | `https://api.openai.com/v1` | 兼容 OpenAI 接口的视觉模型地址。 |
82
+ | `AI_API_KEY` | 否 | 无 | 视觉识别接口的访问密钥。 |
83
+ | `AI_MODEL` | 否 | `Qwen3.6-Plus` | 识别信封图片时使用的模型名称。 |
84
+ | `MAIL_IMAGE_MAX_COUNT` | 否 | `12` | 单次允许上传并识别的最大图片数量。 |
85
+
86
+
87
+ ### 说明
88
+ - `AI_BASE_URL` 可不填,不填时默认使用 `https://api.openai.com/v1`
89
+ - `MAIL_IMAGE_MAX_COUNT` 可不填,不填时默认 `12`
90
+ - `NOTION_TOKEN` 不填时,联系人表会尝试使用本地 fallback,但邮件查询、签收和提交 Notion 仍会受限,基本必须
91
+
92
+ ### notion侧配置
93
+
94
+ - 创建的表应当至少包括 联系人表、邮件记录表
95
+ - 联系人表应当至少包含如下列:姓名 / 昵称,电话,邮编 1, 地址 1, 邮编 2, 地址 2, QQ
96
+ - 其中QQ可以用英文逗号分隔多个
97
+ - 邮件记录表需要包括:消息来源,签收,收件人,寄出日期,邮件编号,寄件人,备注
98
+
99
+ 参考:
100
+
101
+ <img width="1426" height="222" alt="image" src="https://github.com/user-attachments/assets/b9d5247f-5dbf-42b4-85fa-78ca8c502b6a" />
102
+
103
+ <img width="1250" height="404" alt="f3fb19bb-b182-491d-b7ca-10607eea9afd" src="https://github.com/user-attachments/assets/ac436494-39f0-4824-bf2a-09b87536a0ac" />
104
+
105
+
106
+
73
107
  ## 目录
74
108
 
75
109
  ```text
@@ -2,7 +2,7 @@ QQ 邮件登记机器人插件
2
2
 
3
3
  一个基于 NoneBot2 + OneBot v11 的 QQ 机器人文件夹插件,用于管理“寄信 / 查件 / 签收 / 联系人表 / 邮件记录表”,并将数据同步到 Notion。
4
4
 
5
- 版本:0.7.0
5
+ 版本:0.7.2
6
6
 
7
7
  本版本将原 `mail_v7.py` 单文件插件重构为 `nonebot_plugin_mail/` 文件夹插件,并把叶恩杰项目的信封图片智能识别能力整合为群聊命令流程。
8
8
 
@@ -38,13 +38,11 @@ QQ 邮件登记机器人插件
38
38
 
39
39
  ## 配置
40
40
 
41
- 在 NoneBot 2环境配置.env或.env.dev中设置:
42
-
41
+ 在 NoneBot 2 环境配置 `.env` 或 `.env.dev` 中设置:
42
+ ### 示例
43
43
  ```env
44
44
  NOTION_TOKEN=
45
- NOTION_VERSION=2025-09-03
46
45
  RAS_DATA_SOURCE_ID=31e70d82-c716-80ba-b4d2-000b1892f62c
47
- RAS_DATABASE_ID=31e70d82-c716-80d3-9f2d-e73dcc4033b3
48
46
  CONTACT_DATA_SOURCE_ID=31e70d82-c716-8034-b23d-000ba20878af
49
47
  AI_BASE_URL=https://api.exesim.com/v1
50
48
  AI_API_KEY=
@@ -52,6 +50,42 @@ AI_MODEL=Qwen3.6-Plus
52
50
  MAIL_IMAGE_MAX_COUNT=12
53
51
  ```
54
52
 
53
+ ### Notion 相关
54
+ | 配置项 | 必填 | 默认值 | 说明 |
55
+ | --- | --- | --- | --- |
56
+ | `NOTION_TOKEN` | 否,但不建议 | 无 | Notion API 访问令牌,用于读取联系人表、写入邮件记录、签收邮件记录。 |
57
+ | `RAS_DATA_SOURCE_ID` | 否,但不建议 | `31e70d82-c716-80ba-b4d2-000b1892f62c` | 邮件记录表的数据源 ID,用于查询邮件记录。 |
58
+ | `CONTACT_DATA_SOURCE_ID` | 否,但不建议 | `31e70d82-c716-8034-b23d-000ba20878af` | 联系人表的数据源 ID,用于读取联系人信息。 |
59
+
60
+ ### AI 相关
61
+ | 配置项 | 必填 | 默认值 | 说明 |
62
+ | --- | --- | --- | --- |
63
+ | `AI_BASE_URL` | 否 | `https://api.openai.com/v1` | 兼容 OpenAI 接口的视觉模型地址。 |
64
+ | `AI_API_KEY` | 否 | 无 | 视觉识别接口的访问密钥。 |
65
+ | `AI_MODEL` | 否 | `Qwen3.6-Plus` | 识别信封图片时使用的模型名称。 |
66
+ | `MAIL_IMAGE_MAX_COUNT` | 否 | `12` | 单次允许上传并识别的最大图片数量。 |
67
+
68
+
69
+ ### 说明
70
+ - `AI_BASE_URL` 可不填,不填时默认使用 `https://api.openai.com/v1`
71
+ - `MAIL_IMAGE_MAX_COUNT` 可不填,不填时默认 `12`
72
+ - `NOTION_TOKEN` 不填时,联系人表会尝试使用本地 fallback,但邮件查询、签收和提交 Notion 仍会受限,基本必须
73
+
74
+ ### notion侧配置
75
+
76
+ - 创建的表应当至少包括 联系人表、邮件记录表
77
+ - 联系人表应当至少包含如下列:姓名 / 昵称,电话,邮编 1, 地址 1, 邮编 2, 地址 2, QQ
78
+ - 其中QQ可以用英文逗号分隔多个
79
+ - 邮件记录表需要包括:消息来源,签收,收件人,寄出日期,邮件编号,寄件人,备注
80
+
81
+ 参考:
82
+
83
+ <img width="1426" height="222" alt="image" src="https://github.com/user-attachments/assets/b9d5247f-5dbf-42b4-85fa-78ca8c502b6a" />
84
+
85
+ <img width="1250" height="404" alt="f3fb19bb-b182-491d-b7ca-10607eea9afd" src="https://github.com/user-attachments/assets/ac436494-39f0-4824-bf2a-09b87536a0ac" />
86
+
87
+
88
+
55
89
  ## 目录
56
90
 
57
91
  ```text
@@ -1,6 +1,5 @@
1
1
  # python3
2
2
  # -*- coding: utf-8 -*-
3
- # @Version : 0.7.0
4
3
  # 规划备注:插件入口:PluginMetadata、注册所有 handlers
5
4
 
6
5
  from nonebot.plugin import PluginMetadata
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-mail
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: QQ 邮件登记机器人插件,支持 Notion 邮件登记、查询、签收和群聊信封图片智能识别。
5
5
  Author-email: lhc <2743218818@qq.com>
6
6
  License: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/WhyPilotXia/nonebot_plugin_mail
8
- Requires-Python: >=3.10
8
+ Requires-Python: >=3.9
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
11
  Requires-Dist: nonebot2>=2.0.0
@@ -20,7 +20,7 @@ QQ 邮件登记机器人插件
20
20
 
21
21
  一个基于 NoneBot2 + OneBot v11 的 QQ 机器人文件夹插件,用于管理“寄信 / 查件 / 签收 / 联系人表 / 邮件记录表”,并将数据同步到 Notion。
22
22
 
23
- 版本:0.7.0
23
+ 版本:0.7.2
24
24
 
25
25
  本版本将原 `mail_v7.py` 单文件插件重构为 `nonebot_plugin_mail/` 文件夹插件,并把叶恩杰项目的信封图片智能识别能力整合为群聊命令流程。
26
26
 
@@ -56,13 +56,11 @@ QQ 邮件登记机器人插件
56
56
 
57
57
  ## 配置
58
58
 
59
- 在 NoneBot 2环境配置.env或.env.dev中设置:
60
-
59
+ 在 NoneBot 2 环境配置 `.env` 或 `.env.dev` 中设置:
60
+ ### 示例
61
61
  ```env
62
62
  NOTION_TOKEN=
63
- NOTION_VERSION=2025-09-03
64
63
  RAS_DATA_SOURCE_ID=31e70d82-c716-80ba-b4d2-000b1892f62c
65
- RAS_DATABASE_ID=31e70d82-c716-80d3-9f2d-e73dcc4033b3
66
64
  CONTACT_DATA_SOURCE_ID=31e70d82-c716-8034-b23d-000ba20878af
67
65
  AI_BASE_URL=https://api.exesim.com/v1
68
66
  AI_API_KEY=
@@ -70,6 +68,42 @@ AI_MODEL=Qwen3.6-Plus
70
68
  MAIL_IMAGE_MAX_COUNT=12
71
69
  ```
72
70
 
71
+ ### Notion 相关
72
+ | 配置项 | 必填 | 默认值 | 说明 |
73
+ | --- | --- | --- | --- |
74
+ | `NOTION_TOKEN` | 否,但不建议 | 无 | Notion API 访问令牌,用于读取联系人表、写入邮件记录、签收邮件记录。 |
75
+ | `RAS_DATA_SOURCE_ID` | 否,但不建议 | `31e70d82-c716-80ba-b4d2-000b1892f62c` | 邮件记录表的数据源 ID,用于查询邮件记录。 |
76
+ | `CONTACT_DATA_SOURCE_ID` | 否,但不建议 | `31e70d82-c716-8034-b23d-000ba20878af` | 联系人表的数据源 ID,用于读取联系人信息。 |
77
+
78
+ ### AI 相关
79
+ | 配置项 | 必填 | 默认值 | 说明 |
80
+ | --- | --- | --- | --- |
81
+ | `AI_BASE_URL` | 否 | `https://api.openai.com/v1` | 兼容 OpenAI 接口的视觉模型地址。 |
82
+ | `AI_API_KEY` | 否 | 无 | 视觉识别接口的访问密钥。 |
83
+ | `AI_MODEL` | 否 | `Qwen3.6-Plus` | 识别信封图片时使用的模型名称。 |
84
+ | `MAIL_IMAGE_MAX_COUNT` | 否 | `12` | 单次允许上传并识别的最大图片数量。 |
85
+
86
+
87
+ ### 说明
88
+ - `AI_BASE_URL` 可不填,不填时默认使用 `https://api.openai.com/v1`
89
+ - `MAIL_IMAGE_MAX_COUNT` 可不填,不填时默认 `12`
90
+ - `NOTION_TOKEN` 不填时,联系人表会尝试使用本地 fallback,但邮件查询、签收和提交 Notion 仍会受限,基本必须
91
+
92
+ ### notion侧配置
93
+
94
+ - 创建的表应当至少包括 联系人表、邮件记录表
95
+ - 联系人表应当至少包含如下列:姓名 / 昵称,电话,邮编 1, 地址 1, 邮编 2, 地址 2, QQ
96
+ - 其中QQ可以用英文逗号分隔多个
97
+ - 邮件记录表需要包括:消息来源,签收,收件人,寄出日期,邮件编号,寄件人,备注
98
+
99
+ 参考:
100
+
101
+ <img width="1426" height="222" alt="image" src="https://github.com/user-attachments/assets/b9d5247f-5dbf-42b4-85fa-78ca8c502b6a" />
102
+
103
+ <img width="1250" height="404" alt="f3fb19bb-b182-491d-b7ca-10607eea9afd" src="https://github.com/user-attachments/assets/ac436494-39f0-4824-bf2a-09b87536a0ac" />
104
+
105
+
106
+
73
107
  ## 目录
74
108
 
75
109
  ```text
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "nonebot-plugin-mail"
3
- version = "0.7.0"
3
+ version = "0.7.2"
4
4
  description = "QQ 邮件登记机器人插件,支持 Notion 邮件登记、查询、签收和群聊信封图片智能识别。"
5
5
  readme = "README.md"
6
- requires-python = ">=3.10"
6
+ requires-python = ">=3.9"
7
7
  license = { text = "GPL-3.0-or-later" }
8
8
  authors = [
9
9
  { name = "lhc", email = "2743218818@qq.com" }