mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
xp
This commit is contained in:
parent
897617b722
commit
08f6fe7144
8
.github/scripts/build_lunatranslator.py
vendored
8
.github/scripts/build_lunatranslator.py
vendored
@ -29,6 +29,7 @@ mylinks = {
|
||||
"ocr_models": {
|
||||
"ja.zip": "https://github.com/test123456654321/RESOURCES/releases/download/ocr_models/ja.zip",
|
||||
},
|
||||
"mecab_xp.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/mecab_xp.zip",
|
||||
"mecab.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/mecab.zip",
|
||||
"magpie.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/magpie.zip",
|
||||
"themes.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/themes.zip",
|
||||
@ -122,6 +123,11 @@ def downloadmecab():
|
||||
subprocess.run(f"curl -LO {mylinks['mecab.zip']}")
|
||||
subprocess.run(f"7z x mecab.zip -oALL")
|
||||
move_directory_contents("ALL/ALL", f"{rootDir}/files/plugins")
|
||||
def downloadmecabxp():
|
||||
os.chdir(rootDir + "\\temp")
|
||||
subprocess.run(f"curl -LO {mylinks['mecab_xp.zip']}")
|
||||
subprocess.run(f"7z x mecab_xp.zip -oALL")
|
||||
move_directory_contents("ALL/ALL", f"{rootDir}/files/plugins")
|
||||
|
||||
def downloadmapie():
|
||||
os.chdir(rootDir + "\\temp")
|
||||
@ -276,7 +282,6 @@ if __name__ == "__main__":
|
||||
elif sys.argv[1] == "merge":
|
||||
createPluginDirs(0 if arch == "xp" else 1)
|
||||
downloadNtlea()
|
||||
downloadmecab()
|
||||
downloadbass()
|
||||
os.chdir(rootDir)
|
||||
if arch == "xp":
|
||||
@ -299,6 +304,7 @@ if __name__ == "__main__":
|
||||
os.chdir(rootDir)
|
||||
os.system(f"python {os.path.join(rootthisfiledir,'collectall_xp.py')}")
|
||||
exit()
|
||||
downloadmecab()
|
||||
downloadLocaleEmulator()
|
||||
downloadBrotli()
|
||||
downloadCurl()
|
||||
|
@ -28,7 +28,7 @@ def parsecode(code: str):
|
||||
)
|
||||
# 移除类型注解
|
||||
code = re.sub(r": [a-zA-Z0-9_]+\)", ")", code)
|
||||
code = re.sub(r": [a-zA-Z0-9_]+,", ",", code)
|
||||
code = re.sub(r"([a-zA-Z0-9_]): [a-zA-Z0-9_]+,", r"\1,", code)
|
||||
code = re.sub(r": [a-zA-Z0-9_]+ =", " =", code)
|
||||
return code
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user