From 32db3e2433b1acd9e0bb267366d475b00da800eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sun, 24 Mar 2024 20:57:34 +0800 Subject: [PATCH] remove --- .../LunaTranslator/translator/yakuyaku.py | 28 ------------------- .../files/defaultconfig/config.json | 6 ---- .../files/defaultconfig/static_data.json | 4 --- .../defaultconfig/translatorsetting.json | 12 -------- 4 files changed, 50 deletions(-) delete mode 100644 LunaTranslator/LunaTranslator/translator/yakuyaku.py diff --git a/LunaTranslator/LunaTranslator/translator/yakuyaku.py b/LunaTranslator/LunaTranslator/translator/yakuyaku.py deleted file mode 100644 index 0cc14421..00000000 --- a/LunaTranslator/LunaTranslator/translator/yakuyaku.py +++ /dev/null @@ -1,28 +0,0 @@ - -from traceback import print_exc - -import requests ,os - -from myutils.config import globalconfig -from translator.basetranslator import basetrans -import json - -from myutils.subproc import subproc_w,autoproc -class TS(basetrans): - def inittranslator(self): - path=self.config['路径'] - if path=="": - return False - if os.path.exists(path)==False: - return False - yakupath=os.path.join(path,'YakuYaku/server.py') - yakupathd=os.path.join(path,'YakuYaku') - pypath=os.path.join(path,'python-3.11.5-embed-amd64/python.exe') - if os.path.exists(pypath)==False: - return False - self.engine=autoproc(subproc_w('"{}" "{}"'.format(pypath,yakupath),cwd=yakupathd,name='yakuyaku')) - def translate(self,query): - - res=requests.get('http://127.0.0.1:1998/',params={'text':query,'t2s':'t2s' if self.tgtlang=='zh' else ''}).text - - return res \ No newline at end of file diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index f21a467b..f34c28e0 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -942,12 +942,6 @@ "color": "#1839f0", "name": "Sugoi" }, - "yakuyaku": { - "type": "offline", - "use": false, - "color": "#1839f0", - "name": "YakuYaku" - }, "kingsoft": { "type": "offline", "use": false, diff --git a/LunaTranslator/files/defaultconfig/static_data.json b/LunaTranslator/files/defaultconfig/static_data.json index 8b36ee88..7f933b2d 100644 --- a/LunaTranslator/files/defaultconfig/static_data.json +++ b/LunaTranslator/files/defaultconfig/static_data.json @@ -29,10 +29,6 @@ "name": "金山快译", "link": "https://github.com/HIllya51/RESOURCES/releases/download/offline_translator/FastAIT09_Setup.25269.4101.zip" }, - { - "name": "YakuYaku", - "link": "https://github.com/HIllya51/RESOURCES/releases/download/offline_translator/YakuYaku.zip" - }, { "name": "快译通", "link": "https://github.com/HIllya51/RESOURCES/releases/download/offline_translator/DR.eye.zip" diff --git a/LunaTranslator/files/defaultconfig/translatorsetting.json b/LunaTranslator/files/defaultconfig/translatorsetting.json index be99e88d..0c5f0617 100644 --- a/LunaTranslator/files/defaultconfig/translatorsetting.json +++ b/LunaTranslator/files/defaultconfig/translatorsetting.json @@ -159,18 +159,6 @@ } } }, - "yakuyaku": { - "args": { - "路径": "" - } - , - "argstype":{ - "路径":{ - "type":"file", - "dir":true - } - } - }, "huoshanapi": { "args": { "注册网址": "https://www.volcengine.com/docs/4640/130872",