nonebot-plugin-l4d2-server 1.1.2__py3-none-any.whl → 1.1.3__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.
@@ -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.1.2"
13
+ __version__ = "1.1.3"
14
14
  TEXT_PATH = Path(__file__).parent / "texture2d"
15
15
  HELP_DATA = Path(__file__).parent / "Help.json"
16
16
 
@@ -1,9 +1,10 @@
1
1
  from pathlib import Path
2
+ import re
2
3
  from typing import List, Optional
3
4
 
4
5
  import jinja2
5
6
  from nonebot.log import logger
6
- from nonebot_plugin_htmlrender import html_to_pic
7
+ from nonebot_plugin_htmlrender import html_to_pic, template_to_html, template_to_pic
7
8
 
8
9
  from ..config import config
9
10
  from ..utils.api.models import OutServer
@@ -69,7 +70,12 @@ async def server_ip_pic(server_dict: List[OutServer]):
69
70
 
70
71
  async def get_server_img(plugins: List[OutServer]) -> Optional[bytes]:
71
72
  try:
72
- template = env.get_template("normal.html")
73
+ if config.l4_style == "default":
74
+
75
+
76
+ template = env.get_template("normal.html")
77
+ else:
78
+ template = env.get_template("normal_old.html")
73
79
  content = await template.render_async(
74
80
  servers=plugins,
75
81
  max_count=config.l4_players,
@@ -93,8 +93,6 @@
93
93
  <img src="vac.png" alt="VAC保护">
94
94
  </span>
95
95
  {% endif %}
96
- <span class="ping-value">
97
- {{ (server.server.ping * 1000)|round(1) }} ms
98
96
  </span>
99
97
  </span>
100
98
  </div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-l4d2-server
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: L4D2 server related operations plugin for NoneBot2
5
5
  Keywords: steam,game,l4d2,nonebot2,plugin
6
6
  Author-Email: Agnes_Digital <Z735803792@163.com>
@@ -158,11 +158,8 @@ conda install nonebot-plugin-l4d2-server
158
158
  l4_players = 4
159
159
  """查询总图的时候展示的用户数量"""
160
160
  l4_style = "default"
161
- """图片风格,可选包括以下,默认简洁
162
- - 暗风格
163
- - 孤独摇滚
164
- - 电玩像素
165
- - 缤纷彩虹
161
+ """图片风格,可选包括以下
162
+ - 简洁
166
163
  """
167
164
 
168
165
  ## 和0.x.x更改部分
@@ -1,13 +1,13 @@
1
- nonebot_plugin_l4d2_server-1.1.2.dist-info/METADATA,sha256=4ef1UA6SVX2VR7BCs1FKWV3zwRB30WQkODc8cOBDdFg,6728
2
- nonebot_plugin_l4d2_server-1.1.2.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- nonebot_plugin_l4d2_server-1.1.2.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- nonebot_plugin_l4d2_server-1.1.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1
+ nonebot_plugin_l4d2_server-1.1.3.dist-info/METADATA,sha256=hYRj3uiAYZ2vKvv5yMpEg7K7LEbm2KxhmQYcFiBJ35M,6653
2
+ nonebot_plugin_l4d2_server-1.1.3.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ nonebot_plugin_l4d2_server-1.1.3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ nonebot_plugin_l4d2_server-1.1.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
5
5
  nonebot_plugin_l4d2_server/__init__.py,sha256=xzhXyprPmoTTjpfyqYlMweC4umuLsm8MERA1ZTqCyYc,1661
6
6
  nonebot_plugin_l4d2_server/__main__.py,sha256=-m1tH_4T-9AP66V3Drb1t8CZXZMc0eAUXZsBY3LEBuI,10271
7
7
  nonebot_plugin_l4d2_server/config.py,sha256=Xxhl6YkDxQiEFdptXaWDoFfiwnVJGhjF39gfX4A0sdg,4193
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=QQgYRR-KN6odwLpR9peUIIjlffOyfwwKnHzbHWOH2Fw,1479
10
+ nonebot_plugin_l4d2_server/l4_help/__init__.py,sha256=JrdFAQGqe0zcDWJUmkwwNulAGEOKa-ngdUVX8ThTRfE,1479
11
11
  nonebot_plugin_l4d2_server/l4_help/draw.py,sha256=y6yDPUnoZFvwly8cf7g9HRpT1JXTxyA9DC1TuvUinTM,6448
12
12
  nonebot_plugin_l4d2_server/l4_help/texture2d/badge.png,sha256=KJlwepfquSqdo7kXhTCK_asLP3Vu-zfQKoOOTTYGBFc,8186
13
13
  nonebot_plugin_l4d2_server/l4_help/texture2d/banner.png,sha256=e7dNro0VBjtdxnXkAjHP_AM3IVPevTgfQbATpJ6toMw,32330
@@ -17,7 +17,7 @@ nonebot_plugin_l4d2_server/l4_help/texture2d/icon.png,sha256=A2p0r8aBXpNy_b_CtZT
17
17
  nonebot_plugin_l4d2_server/l4_image/__init__.py,sha256=-GWXUDv_z_cfJ-wyvx5J3wB9P7ng4NzRHfCq-GZD6XQ,431
18
18
  nonebot_plugin_l4d2_server/l4_image/convert.py,sha256=HXTQAkxaAUWGB7YidyD2KFcavthNYGdlr951PZEF4Uk,2606
19
19
  nonebot_plugin_l4d2_server/l4_image/download.py,sha256=qRAo0Ggj5KV8RQN3LFJe547__wwC7Ww4QnT-v3pfe6w,3116
20
- nonebot_plugin_l4d2_server/l4_image/html_img.py,sha256=FkHLZ04y9F5qboYVYFMr015BfaOoNhRIEzObwSLi-D8,3225
20
+ nonebot_plugin_l4d2_server/l4_image/html_img.py,sha256=Q3DF2_orcLMXMfNLj_EOAWqSTVxj6mIJ8Wc0Z74ovzQ,3390
21
21
  nonebot_plugin_l4d2_server/l4_image/image_tools.py,sha256=oJmYiHPEbFESK4QzsdFm3vrdF0qBRhSqbYXCRnCtzpk,11656
22
22
  nonebot_plugin_l4d2_server/l4_image/img/anne/anne.html,sha256=8JOUXoWdulhoP2Axy_omuSDafbduKDZ9Y8Rz2VZWTso,1590
23
23
  nonebot_plugin_l4d2_server/l4_image/img/anne/back.png,sha256=jnsYjnvd2BFcdkdsW8HgcSloWF0ZliPkqlWSIDnFUxw,245488
@@ -34,8 +34,8 @@ nonebot_plugin_l4d2_server/l4_image/img/template/bilibili.svg,sha256=v3u6R-HLoTH
34
34
  nonebot_plugin_l4d2_server/l4_image/img/template/github.svg,sha256=Ev2CdWEyL4G-_bhZJ9vBZr5MEWjcgSR819mracoXjqc,1175
35
35
  nonebot_plugin_l4d2_server/l4_image/img/template/l.svg,sha256=YbahWPd7uau6edcATiWrA8apYyrlKeTejuvRHwXkmLI,5484
36
36
  nonebot_plugin_l4d2_server/l4_image/img/template/m.svg,sha256=JKosfpA8Jncw018dWHVzVR8orC48u3mMdzQovWAa91s,2428
37
- nonebot_plugin_l4d2_server/l4_image/img/template/normal.html,sha256=fGn58foIWX1IEy96A-XIuUJa49Jml6ZASYFSfFjEMak,5276
38
- nonebot_plugin_l4d2_server/l4_image/img/template/normal_.html,sha256=TbHKy4cV-7rEVuE3dx75P1Pf9YKTIp8KW5JoaJFMenY,6610
37
+ nonebot_plugin_l4d2_server/l4_image/img/template/normal.html,sha256=ofmX9Fs7IkusXWOJDcBVl3kO7OTd0pDtnJi6AYuMKUQ,5144
38
+ nonebot_plugin_l4d2_server/l4_image/img/template/normal_old.html,sha256=TbHKy4cV-7rEVuE3dx75P1Pf9YKTIp8KW5JoaJFMenY,6610
39
39
  nonebot_plugin_l4d2_server/l4_image/img/template/style.css,sha256=frEXxpwPQkWZorO4abhSlFZCmpsx5enYsbdwUYoX_E8,4589
40
40
  nonebot_plugin_l4d2_server/l4_image/img/template/vac.png,sha256=sX2_qenkRakqP74Sq-FoBYBX1qS8gVYz9L07ijL2vlc,6741
41
41
  nonebot_plugin_l4d2_server/l4_image/img/template/vac_white.png,sha256=3hpqIOp07FJhl9F15Mzc0LUMWQBAZhif8Ealb4doyoI,6045
@@ -54,4 +54,4 @@ nonebot_plugin_l4d2_server/utils/api/request.py,sha256=JGAhMgPgmy2Z2w7w3GVlUGKBm
54
54
  nonebot_plugin_l4d2_server/utils/api/utils.py,sha256=rdrFK3VKP59KfNX-C8v0Q_IV3tBLm02Wo9axLTQQ87Y,762
55
55
  nonebot_plugin_l4d2_server/utils/database/models.py,sha256=SLdcgwsn39r_ZkcBoqf4MLX1EfpCOjGBwWcR16u9Bqo,454
56
56
  nonebot_plugin_l4d2_server/utils/utils.py,sha256=KHfnTO3a-rGpjhXTsXypC0xb61ijpON631zqjIAW2vo,6836
57
- nonebot_plugin_l4d2_server-1.1.2.dist-info/RECORD,,
57
+ nonebot_plugin_l4d2_server-1.1.3.dist-info/RECORD,,