📦 插件商店上新:liteyukibot-plugin-htmlrender及liteyukibot-plugin-lagrange

This commit is contained in:
远野千束 2024-08-24 11:39:10 +08:00
parent 93c287bbd9
commit ebe0c5bcbb
6 changed files with 88 additions and 74 deletions

View File

@ -38,5 +38,58 @@
"type": "application", "type": "application",
"valid": true, "valid": true,
"version": "rolling" "version": "rolling"
},
{
"module_name": "liteyukibot-plugin-lagrange",
"project_link": "liteyukibot-plugin-lagrange",
"name": "LagrangePlugin",
"desc": "在轻雪中使用lagrange-python",
"author": "snowykami",
"homepage": "https://github.com/snowykami/liteyukibot-plugin-lagrange",
"tags": [
{
"label": "app",
"color": "#aeeaa8"
},
{
"label": "lagrange",
"color": "#ff89f7"
}
],
"is_official": true,
"type": "application",
"valid": true,
"version": "rolling"
},
{
"module_name": "liteyukibot-plugin-htmlrender",
"project_link": "liteyukibot-plugin-htmlrender",
"name": "htmlrender",
"desc": "使用系统中的浏览器对网页进行渲染,便于其他插件使用",
"author": "EillesWan",
"homepage": "https://github.com/LiteyukiStudio/liteyukibot-plugin-htmlrender",
"tags": [
{
"label": "ch",
"color": "#4285f4"
},
{
"label": "ro",
"color": "#db4437"
},
{
"label": "mi",
"color": "#f4b400"
},
{
"label": "um",
"color": "#0f9d58"
}
],
"is_official": true,
"type": "application",
"valid": true,
"version": "rolling"
} }
] ]

View File

@ -1,31 +1,31 @@
LSO license LSO license
LiteyukiStudio Opensource license LiteyukiStudio Opensource license
--- ---
Copyright © 2024 Snowykami Copyright © 2024 Snowykami
--- ---
Free to grant the same license-based rights to any person or organization who obtains a copy Free to grant the same license-based rights to any person or organization who obtains a copy
including but not limited to using, copying, modifying, merging, publishing, distributing, sublicenseing, and/or selling copies of the software including but not limited to using, copying, modifying, merging, publishing, distributing, sublicenseing, and/or selling copies of the software
This software and related documentation files (hereinafter referred to as "this software") are licensed in the same way as the base, and are released in the form of open source on the Internet or other media platforms This software and related documentation files (hereinafter referred to as "this software") are licensed in the same way as the base, and are released in the form of open source on the Internet or other media platforms
Everyone has the right to obtain a copy and obtain permission to distribute and/or use it in the above manner Everyone has the right to obtain a copy and obtain permission to distribute and/or use it in the above manner
However, when obtaining a copy, it is still necessary to pay attention to the following: However, when obtaining a copy, it is still necessary to pay attention to the following:
- The above copyright notice and this permission notice shall be included in a copy of the Software - The above copyright notice and this permission notice shall be included in a copy of the Software
- When using this software and its copies, it is still necessary to maintain the same form as the original - When using this software and its copies, it is still necessary to maintain the same form as the original
- When using this software, you still need to disclose the copy of this software under the same license: - When using this software, you still need to disclose the copy of this software under the same license:
- Do not profit from copies of this software in a non-original license without the permission of the original author - Do not profit from copies of this software in a non-original license without the permission of the original author
--- ---
The software is provided as a "copy as is" without any warranty of any kind, either express or implied: The software is provided as a "copy as is" without any warranty of any kind, either express or implied:
including but not limited to the warranty of merchantability, non-infringement for specific purposes including but not limited to the warranty of merchantability, non-infringement for specific purposes
In any case, the author or copyright owner shall not be liable for any claims, damages, or other liabilities arising from the use of the software by the author or copyright owner, whether in contract litigation, infringement litigation, or other litigation. The author and its copyright owner have the right to refuse compensation for any losses caused by the user for personal reasons In any case, the author or copyright owner shall not be liable for any claims, damages, or other liabilities arising from the use of the software by the author or copyright owner, whether in contract litigation, infringement litigation, or other litigation. The author and its copyright owner have the right to refuse compensation for any losses caused by the user for personal reasons

View File

@ -11,56 +11,16 @@
import os import os
import json import json
import copy import copy
import platform
from typing import Any, List
import toml import toml
import yaml import yaml
from pydantic import BaseModel
from typing import Any
from liteyuki.log import logger from liteyuki.log import logger
_SUPPORTED_CONFIG_FORMATS = (".yaml", ".yml", ".json", ".toml") _SUPPORTED_CONFIG_FORMATS = (".yaml", ".yml", ".json", ".toml")
# 以下这三个 Config 和 src/utils/base/config.py 中重复
# 应尽快整理
class SatoriNodeConfig(BaseModel):
host: str = ""
port: str = "5500"
path: str = ""
token: str = ""
class SatoriConfig(BaseModel):
comment: str = (
"These features are still in development. Do not enable in production environment."
)
enable: bool = False
hosts: List[SatoriNodeConfig] = [SatoriNodeConfig()]
class BasicConfig(BaseModel):
host: str = "127.0.0.1"
port: int = 20216
superusers: list[str] = []
command_start: list[str] = ["/", ""]
nickname: list[str] = [f"LiteyukiBot"]
satori: SatoriConfig = SatoriConfig()
data_path: str = "data/liteyuki"
chromium_path: str = (
"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" # type: ignore
if platform.system() == "Darwin"
else (
"C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
if platform.system() == "Windows"
else "/usr/bin/chromium-browser"
)
)
def flat_config(config: dict[str, Any]) -> dict[str, Any]: def flat_config(config: dict[str, Any]) -> dict[str, Any]:
""" """
扁平化配置文件 扁平化配置文件

0
liteyuki/py.typed Normal file
View File

View File

@ -7,7 +7,8 @@ from cpuinfo import cpuinfo
from nonebot import require from nonebot import require
from nonebot.adapters import satori from nonebot.adapters import satori
from src.utils import __NAME__, __VERSION__ from src.utils import __NAME__
from liteyuki import __version__
from src.utils.base.config import get_config from src.utils.base.config import get_config
from src.utils.base.data_manager import TempConfig, common_db from src.utils.base.data_manager import TempConfig, common_db
from src.utils.base.language import Language from src.utils.base.language import Language