nonebot-plugin-l4d2-server 1.0.5__py3-none-any.whl → 1.0.6__py3-none-any.whl
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_l4d2_server/__init__.py +1 -0
- nonebot_plugin_l4d2_server/l4_help/__init__.py +1 -1
- nonebot_plugin_l4d2_server/l4_image/html_img.py +0 -15
- nonebot_plugin_l4d2_server/l4_image/image_tools.py +1 -2
- {nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/METADATA +1 -1
- {nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/RECORD +9 -10
- nonebot_plugin_l4d2_server/l4_image/anne_pil.py +0 -18
- {nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/WHEEL +0 -0
- {nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/entry_points.txt +0 -0
- {nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/licenses/LICENSE +0 -0
@@ -20,6 +20,7 @@ from nonebot import get_driver, require
|
|
20
20
|
require("nonebot_plugin_htmlrender")
|
21
21
|
require("nonebot_plugin_alconna")
|
22
22
|
require("nonebot_plugin_tortoise_orm")
|
23
|
+
require("nonebot_plugin_datastore")
|
23
24
|
|
24
25
|
from nonebot.plugin import PluginMetadata, inherit_supported_adapters # noqa: E402
|
25
26
|
|
@@ -10,7 +10,7 @@ from ..l4_image.convert import core_font
|
|
10
10
|
from ..l4_image.model import PluginHelp
|
11
11
|
from .draw import get_help
|
12
12
|
|
13
|
-
__version__ = "1.0.
|
13
|
+
__version__ = "1.0.6"
|
14
14
|
TEXT_PATH = Path(__file__).parent / "texture2d"
|
15
15
|
HELP_DATA = Path(__file__).parent / "Help.json"
|
16
16
|
|
@@ -88,18 +88,3 @@ async def get_server_img(plugins: List[OutServer]) -> Optional[bytes]:
|
|
88
88
|
except Exception as e:
|
89
89
|
logger.warning(f"Error in get_help_img: {e}")
|
90
90
|
return None
|
91
|
-
|
92
|
-
|
93
|
-
# async def server_group_ip_pic(msg_list: List[ServerGroup]) -> bytes:
|
94
|
-
# """
|
95
|
-
# 输入一个群组字典列表,输出图片
|
96
|
-
# msg_dict:folder/name/map_/players/max_players/Players/[Name]
|
97
|
-
# """
|
98
|
-
# template = env.get_template("group_ip.html")
|
99
|
-
# html = await template.render_async(plugins=msg_list)
|
100
|
-
# return await html_to_pic(
|
101
|
-
# html=html,
|
102
|
-
# wait=0,
|
103
|
-
# viewport={"width": 1100, "height": 800},
|
104
|
-
# template_path=f"file://{template_path.absolute()}",
|
105
|
-
# )
|
@@ -155,9 +155,8 @@ def draw_text_by_line(
|
|
155
155
|
y_add = math.ceil(1.3 * h) if line_space is None else math.ceil(h + line_space)
|
156
156
|
draw = ImageDraw.Draw(img)
|
157
157
|
row = "" # 存储本行文字
|
158
|
-
length = 0
|
158
|
+
length = 0
|
159
159
|
for character in text:
|
160
|
-
# 获取当前字符的宽度
|
161
160
|
if hasattr(font, "getsize"):
|
162
161
|
w, h = font.getsize(character) # type: ignore
|
163
162
|
else:
|
{nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/RECORD
RENAMED
@@ -1,13 +1,13 @@
|
|
1
|
-
nonebot_plugin_l4d2_server-1.0.
|
2
|
-
nonebot_plugin_l4d2_server-1.0.
|
3
|
-
nonebot_plugin_l4d2_server-1.0.
|
4
|
-
nonebot_plugin_l4d2_server-1.0.
|
5
|
-
nonebot_plugin_l4d2_server/__init__.py,sha256=
|
1
|
+
nonebot_plugin_l4d2_server-1.0.6.dist-info/METADATA,sha256=TrdHugLvUGD1ocHgQilSDAkjsJePWYm38sMg4IOQMEc,6759
|
2
|
+
nonebot_plugin_l4d2_server-1.0.6.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
nonebot_plugin_l4d2_server-1.0.6.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
|
+
nonebot_plugin_l4d2_server-1.0.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
5
|
+
nonebot_plugin_l4d2_server/__init__.py,sha256=xzhXyprPmoTTjpfyqYlMweC4umuLsm8MERA1ZTqCyYc,1661
|
6
6
|
nonebot_plugin_l4d2_server/__main__.py,sha256=2o6EyUyig3iPqcKA2jQM5nxGS_MtTyf-4yDXjr7ga9w,9923
|
7
7
|
nonebot_plugin_l4d2_server/config.py,sha256=t4BYygrrLTcsl9oBnyce0-tDhMCCkMrkEPs4DX2t4KI,2682
|
8
8
|
nonebot_plugin_l4d2_server/data/font/loli.ttf,sha256=Yrh-RPoCrn1-NG94DR0x20ASXYUt8g3Ep6BCt3CdOFk,11125812
|
9
9
|
nonebot_plugin_l4d2_server/l4_help/Help.json,sha256=D0YmZYGW-imC7nVebkQ0_eODiqevQhL9aKj-cyBaqDY,1704
|
10
|
-
nonebot_plugin_l4d2_server/l4_help/__init__.py,sha256=
|
10
|
+
nonebot_plugin_l4d2_server/l4_help/__init__.py,sha256=xE9UfwgwJPg3bcYwPuGqtkSOkUFkAi9kNMG8zGDheas,1479
|
11
11
|
nonebot_plugin_l4d2_server/l4_help/draw.py,sha256=y6yDPUnoZFvwly8cf7g9HRpT1JXTxyA9DC1TuvUinTM,6448
|
12
12
|
nonebot_plugin_l4d2_server/l4_help/icon/介绍.png,sha256=3QC6A38QC-7gDBxmtQSQdbsz7hsefU5LL-oZmJ41zTk,3806
|
13
13
|
nonebot_plugin_l4d2_server/l4_help/icon/任务.png,sha256=nyZ4_kM21ZO95nwanCFnUfCGX-PkmJXYQf9OrJVKomY,3782
|
@@ -51,11 +51,10 @@ nonebot_plugin_l4d2_server/l4_help/texture2d/bg.jpg,sha256=xTyLJLgo3E-ZH-tupsjZC
|
|
51
51
|
nonebot_plugin_l4d2_server/l4_help/texture2d/button.png,sha256=oQKoRBJDaVXz2eVD-lHkaVcV1aw0ehkNBK8TNSjTehI,12711
|
52
52
|
nonebot_plugin_l4d2_server/l4_help/texture2d/icon.png,sha256=A2p0r8aBXpNy_b_CtZTZzTrEeHbGRYzO2fNwahyLlQ0,634659
|
53
53
|
nonebot_plugin_l4d2_server/l4_image/__init__.py,sha256=-GWXUDv_z_cfJ-wyvx5J3wB9P7ng4NzRHfCq-GZD6XQ,431
|
54
|
-
nonebot_plugin_l4d2_server/l4_image/anne_pil.py,sha256=Q_PHRzB_OgPbRbnLg-asVduV477F1rQnau2DhPOzf5k,500
|
55
54
|
nonebot_plugin_l4d2_server/l4_image/convert.py,sha256=MISJq2JFcmQJaYZz6dDjQ2UusVORQt7rLSoAY_CyyWY,3894
|
56
55
|
nonebot_plugin_l4d2_server/l4_image/download.py,sha256=qRAo0Ggj5KV8RQN3LFJe547__wwC7Ww4QnT-v3pfe6w,3116
|
57
|
-
nonebot_plugin_l4d2_server/l4_image/html_img.py,sha256=
|
58
|
-
nonebot_plugin_l4d2_server/l4_image/image_tools.py,sha256=
|
56
|
+
nonebot_plugin_l4d2_server/l4_image/html_img.py,sha256=BE_GQ67KRCb-r_iaVOLPAEoloNvOA9bbxhc8o8WhLXc,2882
|
57
|
+
nonebot_plugin_l4d2_server/l4_image/image_tools.py,sha256=iHkvG2fYxYCz7B2JV69MSMlH5KXyWftcBs_prmyTyO4,14453
|
59
58
|
nonebot_plugin_l4d2_server/l4_image/img/anne/anne.html,sha256=8JOUXoWdulhoP2Axy_omuSDafbduKDZ9Y8Rz2VZWTso,1590
|
60
59
|
nonebot_plugin_l4d2_server/l4_image/img/anne/back.png,sha256=jnsYjnvd2BFcdkdsW8HgcSloWF0ZliPkqlWSIDnFUxw,245488
|
61
60
|
nonebot_plugin_l4d2_server/l4_image/img/anne/back1.jpg,sha256=hAzPHflbf4db5S3rM5xn-1wnDP8xZExikYmkKW5c4w0,113622
|
@@ -95,4 +94,4 @@ nonebot_plugin_l4d2_server/utils/api/request.py,sha256=9cipv2M7nar3kmpmmEjgtzBQK
|
|
95
94
|
nonebot_plugin_l4d2_server/utils/api/utils.py,sha256=AnI9vwe3hqyh3GR4Xg2oOsVaXHo1xvnCCsVpGaIbpZ8,773
|
96
95
|
nonebot_plugin_l4d2_server/utils/database/models.py,sha256=SLdcgwsn39r_ZkcBoqf4MLX1EfpCOjGBwWcR16u9Bqo,454
|
97
96
|
nonebot_plugin_l4d2_server/utils/utils.py,sha256=TD3cUCxmmj2GPmK1sQwP7NtkIXNO2FpuXjymaUqBDYo,6141
|
98
|
-
nonebot_plugin_l4d2_server-1.0.
|
97
|
+
nonebot_plugin_l4d2_server-1.0.6.dist-info/RECORD,,
|
@@ -1,18 +0,0 @@
|
|
1
|
-
from pathlib import Path
|
2
|
-
|
3
|
-
from PIL import Image, ImageFont
|
4
|
-
|
5
|
-
from nonebot_plugin_l4d2_server.utils.api.models import AnnePlayer2
|
6
|
-
|
7
|
-
from ..config import config
|
8
|
-
|
9
|
-
font = ImageFont.truetype(config.l4_font)
|
10
|
-
|
11
|
-
anne_path = Path(__file__).parent / "img" / "anne"
|
12
|
-
|
13
|
-
|
14
|
-
async def anne_player_info(msg: AnnePlayer2): # noqa: RUF029
|
15
|
-
back_img = Image.open(anne_path / "back1.jpg")
|
16
|
-
base_img = Image.new("RGBA", (back_img.size), (255, 255, 255, 50))
|
17
|
-
back_img.paste(base_img, (0, 0), base_img)
|
18
|
-
return msg
|
{nonebot_plugin_l4d2_server-1.0.5.dist-info → nonebot_plugin_l4d2_server-1.0.6.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|