fix: npm对插件无法启用的bug

feat: 资源包的管理器
This commit is contained in:
2024-04-07 00:35:53 +08:00
parent 72742d805c
commit 9743868cce
15 changed files with 540 additions and 288 deletions

View File

@ -10,27 +10,6 @@ require("nonebot_plugin_htmlrender")
from nonebot_plugin_htmlrender import *
# async def html2image(
# html: str,
# wait: int = 0,
# template_path: str = None,
# scale_factor: float = 2,
# **kwargs
# ) -> bytes:
# """
# Args:
# html: str: HTML 正文
# wait: 等待时间
# template_path: 模板路径
# scale_factor: 缩放因子,越高越清晰
# **kwargs: page 参数
#
# Returns:
#
# """
# return await html_to_pic(html, wait=wait, template_path=template_path, scale_factor=scale_factor)
async def template2html(
template: str,
templates: dict,
@ -77,6 +56,7 @@ async def template2image(
}
template_path = os.path.dirname(template)
template_name = os.path.basename(template)
print(template_path, template_name)
if debug:
raw_html = await template_to_html(