From fdf101f7776a8e2dd328adfe956b3be8c88e6540 Mon Sep 17 00:00:00 2001 From: Asankilp Date: Thu, 11 Jul 2024 12:27:23 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=E4=BF=AE=E5=A4=8D=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ nonebot_plugin_acgnshow/acgnapis.py | 6 +----- nonebot_plugin_acgnshow/acgnshower.py | 2 +- nonebot_plugin_acgnshow/typing.py | 3 --- pyproject.toml | 3 ++- 5 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 nonebot_plugin_acgnshow/typing.py diff --git a/.gitignore b/.gitignore index 82f9275..a4bac96 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,5 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +bot.py +pdm.lock diff --git a/nonebot_plugin_acgnshow/acgnapis.py b/nonebot_plugin_acgnshow/acgnapis.py index f91e8d8..96aa915 100644 --- a/nonebot_plugin_acgnshow/acgnapis.py +++ b/nonebot_plugin_acgnshow/acgnapis.py @@ -1,6 +1,5 @@ import json import requests -from jinja2 import Template CITY_API_ROOT="https://show.bilibili.com/api/ticket/city/list?channel=3" SHOWS_API_ROOT="https://show.bilibili.com/api/ticket/project/listV2" HEADERS = { @@ -92,7 +91,4 @@ def process_shows_data_to_template(shows_data: dict): "image_url": cover }) showlist.append(dicts) - return showlist - template = Template(show_template) - rendered = template.render(exhibitions=showlist) - return rendered \ No newline at end of file + return showlist \ No newline at end of file diff --git a/nonebot_plugin_acgnshow/acgnshower.py b/nonebot_plugin_acgnshow/acgnshower.py index d72fd87..a0b9542 100644 --- a/nonebot_plugin_acgnshow/acgnshower.py +++ b/nonebot_plugin_acgnshow/acgnshower.py @@ -2,7 +2,7 @@ from nonebot.adapters.onebot.v11 import MessageSegment from nonebot.typing import T_State from typing import Optional from .acgnapis import * -from nonebot_plugin_htmlrender import text_to_pic, template_to_pic +from nonebot_plugin_htmlrender import template_to_pic from nonebot_plugin_alconna import on_alconna from arclet.alconna import Alconna, Args from .config import RES_PATH, TEMPLATE_NAME, config diff --git a/nonebot_plugin_acgnshow/typing.py b/nonebot_plugin_acgnshow/typing.py deleted file mode 100644 index 29da851..0000000 --- a/nonebot_plugin_acgnshow/typing.py +++ /dev/null @@ -1,3 +0,0 @@ -from nonebot.adapters.onebot import v11, v12 -from nonebot.adapters import satori -T_MessageEvent = v11.MessageEvent | v12.MessageEvent | satori.MessageEvent diff --git a/pyproject.toml b/pyproject.toml index 54ebb94..c3170da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "nonebot-plugin-acgnshow" version = "0.1.1" description = "Nonebot2插件,从哔哩哔哩会员购获取简易展览数据" readme = "README.md" -requires-python = "<4.0,>=3.8" +requires-python = "<4.0,>=3.9" authors = [ {name = "Asankilp", email = "asankilp@outlook.com"}, ] @@ -11,6 +11,7 @@ dependencies = [ "nonebot2>=2.2.0", "nonebot-plugin-alconna>=0.48.0", "nonebot-plugin-htmlrender>=0.3.2", + "nonebot-adapter-satori>=0.12", "jinja2>=3.1.4",