nonebot-plugin-htmlrender 0.2.2__tar.gz → 0.2.3__tar.gz

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.
Files changed (22) hide show
  1. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/PKG-INFO +8 -1
  2. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/README.md +7 -0
  3. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/browser.py +3 -0
  4. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/config.py +1 -0
  5. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/pyproject.toml +1 -1
  6. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/LICENSE +0 -0
  7. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/__init__.py +0 -0
  8. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/data_source.py +0 -0
  9. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/github-markdown-light.css +0 -0
  10. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/katex/katex.min.b64_fonts.css +0 -0
  11. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/katex/katex.min.js +0 -0
  12. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/katex/mathtex-script-type.min.js +0 -0
  13. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/markdown.html +0 -0
  14. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/pygments-default.css +0 -0
  15. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/text.css +0 -0
  16. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/nonebot_plugin_htmlrender/templates/text.html +0 -0
  17. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/tests/__init__.py +0 -0
  18. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/tests/conftest.py +0 -0
  19. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/tests/templates/markdown.css +0 -0
  20. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/tests/templates/mystyle.css +0 -0
  21. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/tests/templates/text.html +0 -0
  22. {nonebot_plugin_htmlrender-0.2.2 → nonebot_plugin_htmlrender-0.2.3}/tests/test_htmlrender.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-htmlrender
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: 通过浏览器渲染图片
5
5
  Author-Email: kexue <xana278@foxmail.com>
6
6
  License: MIT License
@@ -83,6 +83,13 @@ htmlrender_download_host = ""
83
83
 
84
84
  # 浏览器自定代理地址 可不写
85
85
  htmlrender_proxy_host = "http://127.0.0.1:7890"
86
+
87
+ # 浏览器 channel 支持以下
88
+ # "chrome", "chrome-beta", "chrome-dev", "chrome-canary",
89
+ # "msedge", "msedge-beta", "msedge-dev", "msedge-canary"
90
+ # 手动编辑可以直接使用系统自带浏览器而不用重新下载 chromium
91
+ # 可不写
92
+ htmlrender_browser_channel = ""
86
93
  ```
87
94
 
88
95
  ## markdown 转 图片
@@ -44,6 +44,13 @@ htmlrender_download_host = ""
44
44
 
45
45
  # 浏览器自定代理地址 可不写
46
46
  htmlrender_proxy_host = "http://127.0.0.1:7890"
47
+
48
+ # 浏览器 channel 支持以下
49
+ # "chrome", "chrome-beta", "chrome-dev", "chrome-canary",
50
+ # "msedge", "msedge-beta", "msedge-dev", "msedge-canary"
51
+ # 手动编辑可以直接使用系统自带浏览器而不用重新下载 chromium
52
+ # 可不写
53
+ htmlrender_browser_channel = ""
47
54
  ```
48
55
 
49
56
  ## markdown 转 图片
@@ -45,6 +45,9 @@ async def init(**kwargs) -> Browser:
45
45
  async def launch_browser(**kwargs) -> Browser:
46
46
  assert _playwright is not None, "Playwright 没有安装"
47
47
 
48
+ if config.htmlrender_browser_channel:
49
+ kwargs["channel"] = config.htmlrender_browser_channel
50
+
48
51
  if config.htmlrender_proxy_host:
49
52
  kwargs["proxy"] = {
50
53
  "server": config.htmlrender_proxy_host,
@@ -7,3 +7,4 @@ class Config(BaseModel, extra=Extra.ignore):
7
7
  htmlrender_browser: Optional[str] = "chromium"
8
8
  htmlrender_download_host: Optional[str]
9
9
  htmlrender_proxy_host: Optional[str]
10
+ htmlrender_browser_channel: Optional[str]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nonebot-plugin-htmlrender"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "通过浏览器渲染图片"
5
5
  authors = [
6
6
  { name = "kexue", email = "xana278@foxmail.com" },