nonebot-plugin-latex 0.0.2.1__py3-none-any.whl → 0.0.2.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ from nonebot.plugin import PluginMetadata
19
19
  from .config import Config
20
20
  from .converter import converter
21
21
 
22
- __version__ = "0.0.2.1"
22
+ __version__ = "0.0.2.2"
23
23
 
24
24
  __author__ = "Eilles"
25
25
 
@@ -36,5 +36,5 @@ __plugin_meta__ = PluginMetadata(
36
36
  config = get_plugin_config(Config)
37
37
 
38
38
 
39
- if config.enable_as_application:
39
+ if config.latex_enable_as_application:
40
40
  from .main import *
@@ -2,7 +2,7 @@ from pydantic import BaseModel
2
2
 
3
3
 
4
4
  class Config(BaseModel):
5
- enable_as_application: bool = False
5
+ latex_enable_as_application: bool = False
6
6
  """
7
7
  是否启用应用逻辑:响应“latex”、“公式”指令
8
8
  """
@@ -39,7 +39,7 @@ class ConvertChannel:
39
39
 
40
40
  class L2PChannel(ConvertChannel):
41
41
 
42
- URL = "https://www.latex2png.com"
42
+ URL = "http://www.latex2png.com"
43
43
 
44
44
  async def get_to_convert(
45
45
  self,
@@ -93,9 +93,9 @@ class L2PChannel(ConvertChannel):
93
93
  start_time = time.time_ns()
94
94
  latex2png = (
95
95
  client.get(
96
- "https://www.latex2png.com{}"
96
+ "http://www.latex2png.com{}"
97
97
  + client.post(
98
- "https://www.latex2png.com/api/convert",
98
+ "http://www.latex2png.com/api/convert",
99
99
  json={
100
100
  "auth": {"user": "guest", "password": "guest"},
101
101
  "latex": "\\\\int_{a}^{b} x^2 \\\\, dx = \\\\frac{b^3}{3} - \\\\frac{a^3}{5}\n",
@@ -116,7 +116,7 @@ class L2PChannel(ConvertChannel):
116
116
 
117
117
  class CDCChannel(ConvertChannel):
118
118
 
119
- URL = "https://latex.codecogs.com"
119
+ URL = "http://latex.codecogs.com"
120
120
 
121
121
  async def get_to_convert(
122
122
  self,
@@ -158,7 +158,7 @@ class CDCChannel(ConvertChannel):
158
158
  start_time = time.time_ns()
159
159
  codecogs = (
160
160
  client.get(
161
- r"https://latex.codecogs.com/png.image?\huge%20\dpi{600}\\int_{a}^{b}x^2\\,dx=\\frac{b^3}{3}-\\frac{a^3}{5}"
161
+ r"http://latex.codecogs.com/png.image?\huge%20\dpi{600}\\int_{a}^{b}x^2\\,dx=\\frac{b^3}{3}-\\frac{a^3}{5}"
162
162
  ),
163
163
  time.time_ns() - start_time,
164
164
  )
@@ -172,7 +172,7 @@ class CDCChannel(ConvertChannel):
172
172
 
173
173
  class JRTChannel(ConvertChannel):
174
174
 
175
- URL = "https://latex2image.joeraut.com"
175
+ URL = "http://latex2image.joeraut.com"
176
176
 
177
177
  async def get_to_convert(
178
178
  self,
@@ -225,7 +225,7 @@ class JRTChannel(ConvertChannel):
225
225
  joeraut = (
226
226
  client.get(
227
227
  client.post(
228
- "https://www.latex2png.com/api/convert",
228
+ "http://www.latex2png.com/api/convert",
229
229
  json={
230
230
  "latexInput": "\\\\int_{a}^{b} x^2 \\\\, dx = \\\\frac{b^3}{3} - \\\\frac{a^3}{5}",
231
231
  "outputFormat": "PNG",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nonebot-plugin-latex
3
- Version: 0.0.2.1
3
+ Version: 0.0.2.2
4
4
  Summary: 通过互联网公共服务渲染LaTeX公式
5
5
  Author-email: Eilles <EillesWan@outlook.com>
6
6
  License: 木兰宽松许可证, 第2版
@@ -164,7 +164,7 @@ pip install nonebot-plugin-latex
164
164
  如果希望直接作为 LaTeX 渲染插件使用的话,请在 NoneBot 配置文件中添加以下内容:
165
165
 
166
166
  ```env
167
- enable_as_application = true
167
+ latex_enable_as_application = true
168
168
  ```
169
169
 
170
170
  这样就可以使用 `latex` 命令进行渲染了,例如 `latex $E=mc^2$` 就会返回这个方程式的渲染图片。
@@ -0,0 +1,10 @@
1
+ nonebot_plugin_latex/__init__.py,sha256=sX4NN2jsnbkd4RqLiT0INoRAi0vGgxuSmh40U-6iCZ8,1267
2
+ nonebot_plugin_latex/config.py,sha256=5WOJF-vsuLqGTDGgklpMm-xLd_qdwVb0VCq-n8EwoJQ,198
3
+ nonebot_plugin_latex/converter.py,sha256=08RmFCBrUda8PlnqazX71aHjntBzlSOJc_ZeUHfMQ_M,89
4
+ nonebot_plugin_latex/data.py,sha256=S_KjGkOBGdJMUeKYRfhJ8yllJgbhg1XjPXyypJQ3CFA,10427
5
+ nonebot_plugin_latex/main.py,sha256=uBN1bQm-i55RimDfwpOPMOx3bkCuPe-vli2NTzuoXRg,3518
6
+ nonebot_plugin_latex-0.0.2.2.dist-info/LICENSE,sha256=ISc-fUbtRp39lxd4MpdVr2Saz7XF2yik0RTSRNuhlaM,9375
7
+ nonebot_plugin_latex-0.0.2.2.dist-info/METADATA,sha256=SGjgpPfQFtnqKJ0RU-trNf_18pBT4-kZr0Xygqm10P4,11656
8
+ nonebot_plugin_latex-0.0.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
+ nonebot_plugin_latex-0.0.2.2.dist-info/top_level.txt,sha256=AEtxXrscUdkhTvgg--hAE9WRsW0QVttzK2H-fI9xbGs,21
10
+ nonebot_plugin_latex-0.0.2.2.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- nonebot_plugin_latex/__init__.py,sha256=CJKPYNITiYW2L8tFY0vp8mPf42YJlwGXIAj7LSz7KPU,1261
2
- nonebot_plugin_latex/config.py,sha256=HSMYcxZ-6jfX0b8ZYavLpcXPEz2uC-d9716UE_vtUhE,192
3
- nonebot_plugin_latex/converter.py,sha256=08RmFCBrUda8PlnqazX71aHjntBzlSOJc_ZeUHfMQ_M,89
4
- nonebot_plugin_latex/data.py,sha256=j2tnJSsBM1iy_ogzSsXNZr0mh64qGIuTLzWO0weIKZc,10434
5
- nonebot_plugin_latex/main.py,sha256=uBN1bQm-i55RimDfwpOPMOx3bkCuPe-vli2NTzuoXRg,3518
6
- nonebot_plugin_latex-0.0.2.1.dist-info/LICENSE,sha256=ISc-fUbtRp39lxd4MpdVr2Saz7XF2yik0RTSRNuhlaM,9375
7
- nonebot_plugin_latex-0.0.2.1.dist-info/METADATA,sha256=FKCpfl22cVQNgjnG62lWEBUAVIl-SmSgJBmRbr4kjME,11650
8
- nonebot_plugin_latex-0.0.2.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
- nonebot_plugin_latex-0.0.2.1.dist-info/top_level.txt,sha256=AEtxXrscUdkhTvgg--hAE9WRsW0QVttzK2H-fI9xbGs,21
10
- nonebot_plugin_latex-0.0.2.1.dist-info/RECORD,,