Skip to content

Commit

Permalink
版本推进至0.11.30,补充元数据与本地化数据
Browse files Browse the repository at this point in the history
  • Loading branch information
MetaLe0 committed May 29, 2024
1 parent d9292b1 commit 9be8fb6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
11 changes: 9 additions & 2 deletions OlivOS/adapter/onebotV11/flaskServerAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ def app(self):

def set_config(self):
with self.Proc_config['Flask_app'].app_context():
@current_app.route(self.Proc_config['Flask_server_xpath'] + '/<platform_path>/<sdk_path>/<model_path>',
methods=self.Proc_config['Flask_server_methods'])
@current_app.route(
f"{self.Proc_config['Flask_server_xpath']}/<platform_path>/<sdk_path>/<model_path>",
methods=self.Proc_config['Flask_server_methods']
)
def Flask_server_func(sdk_path, platform_path, model_path):
sdk_event = OlivOS.onebotSDK.event(request.get_data(as_text=True))
sdk_event.platform['sdk'] = sdk_path
Expand All @@ -92,6 +94,11 @@ def run(self):
str(self.Proc_config['Flask_server_port'])
], modelName
))
self.log(2, OlivOS.L10NAPI.getTrans('OlivOS flask server [{0}] is running on [{1}]', [
self.Proc_config['Flask_name'],
f"http://127.0.0.1:{self.Proc_config['Flask_server_port']}{self.Proc_config['Flask_server_xpath']}/qq/onebot/default"
], modelName
))
if self.Proc_config['config'].debug_mode:
self.Proc_config['Flask_app'].run(host=self.Proc_config['Flask_server_host'],
port=self.Proc_config['Flask_server_port'])
Expand Down
14 changes: 14 additions & 0 deletions OlivOS/core/L10N/L10NDataAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@
'libEXEModelAPI_0004': 'OlivOS libEXEModel failed: {0}\n{1}',
'libEXEModelAPI_0005': 'OlivOS libEXEModel server [{0}] is running',
'libEXEModelAPI_0006': 'OlivOS libEXEModel server [{0}] exited',
'libNapCatEXEModelAPI_0001': 'OlivOS libNapCatEXEModel server [{0}] can`t found target lib',
'libNapCatEXEModelAPI_0002': 'OlivOS libNapCatEXEModel server [{0}] will run under visiable mode',
'libNapCatEXEModelAPI_0003': 'OlivOS libNapCatEXEModel server [{0}] will retry in 10s...',
'libNapCatEXEModelAPI_0004': 'OlivOS libNapCatEXEModel failed: {0}\n{1}',
'libNapCatEXEModelAPI_0005': 'OlivOS libNapCatEXEModel server [{0}] is running',
'libNapCatEXEModelAPI_0006': 'OlivOS libNapCatEXEModel server [{0}] exited',
'flaskServerAPI_0001': 'OlivOS flask server [{0}] is running on port [{1}]',
'flaskServerAPI_0002': 'OlivOS flask server [{0}] is running on [{1}]',
'libCWCBEXEModelAPI_0001': 'OlivOS libCWCBEXEModel server [{0}] can`t found target lib',
'libCWCBEXEModelAPI_0002': 'OlivOS libCWCBEXEModel server [{0}] will run under visiable mode',
'libCWCBEXEModelAPI_0003': 'OlivOS libCWCBEXEModel server [{0}] will retry in 10s...',
Expand Down Expand Up @@ -186,7 +193,14 @@
'libEXEModelAPI_0004': 'OlivOS GoCq进程托管服务组件 错误: {0}\n{1}',
'libEXEModelAPI_0005': 'OlivOS GoCq进程托管服务组件 [{0}] 正在运作',
'libEXEModelAPI_0006': 'OlivOS GoCq进程托管服务组件 [{0}] 已经存在',
'libNapCatEXEModelAPI_0001': 'OlivOS NapCat进程托管服务组件 [{0}] 无法找到库文件',
'libNapCatEXEModelAPI_0002': 'OlivOS NapCat进程托管服务组件 [{0}] 将在前台模式下运行',
'libNapCatEXEModelAPI_0003': 'OlivOS NapCat进程托管服务组件 [{0}] 将在10秒后重试...',
'libNapCatEXEModelAPI_0004': 'OlivOS NapCat进程托管服务组件 错误: {0}\n{1}',
'libNapCatEXEModelAPI_0005': 'OlivOS NapCat进程托管服务组件 [{0}] 正在运作',
'libNapCatEXEModelAPI_0006': 'OlivOS NapCat进程托管服务组件 [{0}] 已经存在',
'flaskServerAPI_0001': 'OlivOS onebotV11 flask POST服务组件 [{0}] 正在运作于端口 [{1}]',
'flaskServerAPI_0002': 'OlivOS onebotV11 flask POST服务组件 [{0}] 的参考上报地址为 [{1}]',
'libCWCBEXEModelAPI_0001': 'OlivOS ComWeChatBotClient进程托管服务组件 [{0}] 无法找到库文件',
'libCWCBEXEModelAPI_0002': 'OlivOS ComWeChatBotClient进程托管服务组件 [{0}] 将在前台模式下运行',
'libCWCBEXEModelAPI_0003': 'OlivOS ComWeChatBotClient进程托管服务组件 [{0}] 将在10秒后重试...',
Expand Down
3 changes: 2 additions & 1 deletion OlivOS/core/core/accountAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def accountFix(basic_conf_models, bot_info_dict, logger_proc):
for bot_info_dict_this in bot_info_dict:
Account_data_this = bot_info_dict[bot_info_dict_this]
if platform.system() == 'Windows':
if Account_data_this.platform['model'] in OlivOS.libEXEModelAPI.gCheckList:
if Account_data_this.platform['model'] in OlivOS.libEXEModelAPI.gCheckList \
or Account_data_this.platform['model'] in OlivOS.libNapCatEXEModelAPI.gCheckList:
if Account_data_this.post_info.auto == True:
Account_data_this.post_info.type = 'post'
Account_data_this.post_info.host = 'http://127.0.0.1'
Expand Down
4 changes: 2 additions & 2 deletions OlivOS/core/info/infoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import OlivOS


OlivOS_Version = '0.11.28'
OlivOS_SVN = 148
OlivOS_Version = '0.11.30'
OlivOS_SVN = 150

# Compatible <= Plugin[compatible_svn] : Compatible
# OldCompatible <= Plugin[compatible_svn] < Compatible : OldCompatible Warn
Expand Down

0 comments on commit 9be8fb6

Please sign in to comment.