mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
remove
This commit is contained in:
parent
eb9849391c
commit
32db3e2433
@ -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
|
@ -942,12 +942,6 @@
|
||||
"color": "#1839f0",
|
||||
"name": "Sugoi"
|
||||
},
|
||||
"yakuyaku": {
|
||||
"type": "offline",
|
||||
"use": false,
|
||||
"color": "#1839f0",
|
||||
"name": "YakuYaku"
|
||||
},
|
||||
"kingsoft": {
|
||||
"type": "offline",
|
||||
"use": false,
|
||||
|
@ -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"
|
||||
|
@ -159,18 +159,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"yakuyaku": {
|
||||
"args": {
|
||||
"路径": ""
|
||||
}
|
||||
,
|
||||
"argstype":{
|
||||
"路径":{
|
||||
"type":"file",
|
||||
"dir":true
|
||||
}
|
||||
}
|
||||
},
|
||||
"huoshanapi": {
|
||||
"args": {
|
||||
"注册网址": "https://www.volcengine.com/docs/4640/130872",
|
||||
|
Loading…
x
Reference in New Issue
Block a user