mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 12:10:57 +00:00
fix: npm对插件无法启用的bug
feat: 资源包的管理器
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user