nonebot-plugin-lazy 0.3.2__tar.gz → 0.3.4__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.
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/PKG-INFO +1 -1
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/notifier.py +7 -27
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/pyproject.toml +1 -1
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/.env.example +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/.github/workflows/publish.yml +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/.gitignore +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/LICENSE +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/README.md +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/__init__.py +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/auth.py +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/config.py +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/handler.py +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/monitor.py +0 -0
- {nonebot_plugin_lazy-0.3.2 → nonebot_plugin_lazy-0.3.4}/nonebot_plugin_lazy/state.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: nonebot-plugin-lazy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: LAZY SERVER 官方支持,在 QQ 内获得学在浙大点名/待办通知
|
|
5
5
|
Project-URL: homepage, https://github.com/yangshu233/nonebot_plugin_lazy
|
|
6
6
|
Project-URL: repository, https://github.com/yangshu233/nonebot_plugin_lazy
|
|
@@ -16,12 +16,6 @@ from nonebot.log import logger
|
|
|
16
16
|
from .config import config
|
|
17
17
|
from .state import runtime_config
|
|
18
18
|
|
|
19
|
-
try:
|
|
20
|
-
# from nonebot_plugin_htmlrender import html_to_pic
|
|
21
|
-
pass
|
|
22
|
-
except ImportError:
|
|
23
|
-
html_to_pic = None
|
|
24
|
-
|
|
25
19
|
|
|
26
20
|
_ROLLCALL_HTML = """<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">{style}</head><body>{body}</body></html>"""
|
|
27
21
|
|
|
@@ -112,16 +106,6 @@ class Notifier:
|
|
|
112
106
|
)
|
|
113
107
|
return _ROLLCALL_HTML.format(style=_STYLE, body=body)
|
|
114
108
|
|
|
115
|
-
async def _render_image(self, html: str) -> bytes | None:
|
|
116
|
-
if html_to_pic is None:
|
|
117
|
-
logger.error("html_to_pic 不可用(nonebot_plugin_htmlrender 未安装)")
|
|
118
|
-
return None
|
|
119
|
-
try:
|
|
120
|
-
return await html_to_pic(html, viewport={"width": 560})
|
|
121
|
-
except Exception as e:
|
|
122
|
-
logger.error(f"渲染图片失败: {e}")
|
|
123
|
-
return None
|
|
124
|
-
|
|
125
109
|
def _resolve_at_qq(self, qq_id: int) -> int:
|
|
126
110
|
if qq_id > 0:
|
|
127
111
|
return qq_id
|
|
@@ -176,17 +160,13 @@ class Notifier:
|
|
|
176
160
|
logger.error("没有可用的 Bot 实例")
|
|
177
161
|
return
|
|
178
162
|
groups = self._target_groups(qq_id)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
f"发起人:{i.get('created_by_name','')}"
|
|
187
|
-
for i in items
|
|
188
|
-
)
|
|
189
|
-
await self._send_text_fallback(qq_id, text, groups)
|
|
163
|
+
|
|
164
|
+
text = "\n\n".join(
|
|
165
|
+
f"🔔 点名\n课程:{i.get('course_title','')}\n"
|
|
166
|
+
f"发起人:{i.get('created_by_name','')}"
|
|
167
|
+
for i in items
|
|
168
|
+
)
|
|
169
|
+
await self._send_text_fallback(qq_id, text, groups)
|
|
190
170
|
|
|
191
171
|
async def notify_todos(self, qq_id: int, items: list[dict]):
|
|
192
172
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|