mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
.
This commit is contained in:
parent
7aa97c92e7
commit
5c081a37e9
10
.github/scripts/build_lunatranslator.py
vendored
10
.github/scripts/build_lunatranslator.py
vendored
@ -283,6 +283,16 @@ def downloadbass():
|
|||||||
"ALL/x64/bass_spx.dll",
|
"ALL/x64/bass_spx.dll",
|
||||||
f"{rootDir}/files/plugins/DLL64",
|
f"{rootDir}/files/plugins/DLL64",
|
||||||
)
|
)
|
||||||
|
subprocess.run(f"curl -LO https://www.un4seen.com/files/z/2/bass_aac24.zip")
|
||||||
|
subprocess.run(f"7z x bass_aac24.zip -oALL")
|
||||||
|
shutil.move(
|
||||||
|
"ALL/bass_aac.dll",
|
||||||
|
f"{rootDir}/files/plugins/DLL32",
|
||||||
|
)
|
||||||
|
shutil.move(
|
||||||
|
"ALL/x64/bass_aac.dll",
|
||||||
|
f"{rootDir}/files/plugins/DLL64",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
set(VERSION_MAJOR 6)
|
set(VERSION_MAJOR 6)
|
||||||
set(VERSION_MINOR 14)
|
set(VERSION_MINOR 14)
|
||||||
set(VERSION_PATCH 11)
|
set(VERSION_PATCH 12)
|
||||||
set(VERSION_REVISION 0)
|
set(VERSION_REVISION 0)
|
||||||
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
|
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
|
||||||
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)
|
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)
|
||||||
|
@ -2125,7 +2125,7 @@ class mdict(cishubase):
|
|||||||
if dis <= distance:
|
if dis <= distance:
|
||||||
results.append(k)
|
results.append(k)
|
||||||
diss[k] = dis
|
diss[k] = dis
|
||||||
return sorted(results, key=lambda x: (diss[x], x))[: self.config["max_num"]]
|
return sorted(results, key=lambda x: diss[x])[: self.config["max_num"]]
|
||||||
|
|
||||||
def parse_strings(self, input_string):
|
def parse_strings(self, input_string):
|
||||||
parsed_strings = []
|
parsed_strings = []
|
||||||
@ -2291,26 +2291,13 @@ class mdict(cishubase):
|
|||||||
try:
|
try:
|
||||||
from tinycss2 import parse_stylesheet, serialize
|
from tinycss2 import parse_stylesheet, serialize
|
||||||
from tinycss2.ast import (
|
from tinycss2.ast import (
|
||||||
HashToken,
|
|
||||||
WhitespaceToken,
|
WhitespaceToken,
|
||||||
AtRule,
|
AtRule,
|
||||||
QualifiedRule,
|
QualifiedRule,
|
||||||
IdentToken,
|
|
||||||
ParseError,
|
ParseError,
|
||||||
Node,
|
LiteralToken,
|
||||||
)
|
)
|
||||||
|
|
||||||
class KlassToken(Node):
|
|
||||||
type = "ident"
|
|
||||||
|
|
||||||
def __init__(self, line, column, value):
|
|
||||||
Node.__init__(self, line, column)
|
|
||||||
self.value = value
|
|
||||||
|
|
||||||
def _serialize_to(self, write):
|
|
||||||
write(".")
|
|
||||||
write(self.value)
|
|
||||||
|
|
||||||
rules = parse_stylesheet(file_content, True, True)
|
rules = parse_stylesheet(file_content, True, True)
|
||||||
|
|
||||||
def parseaqr(rule: QualifiedRule):
|
def parseaqr(rule: QualifiedRule):
|
||||||
@ -2325,7 +2312,9 @@ class mdict(cishubase):
|
|||||||
if start:
|
if start:
|
||||||
if token.type == "ident" and token.value == "body":
|
if token.type == "ident" and token.value == "body":
|
||||||
# body
|
# body
|
||||||
rule.prelude.insert(idx + 1, KlassToken(0, 0, divid))
|
rule.prelude.insert(
|
||||||
|
idx + 1, LiteralToken(0, 0, "." + divid)
|
||||||
|
)
|
||||||
rule.prelude.insert(idx + 1, WhitespaceToken(0, 0, " "))
|
rule.prelude.insert(idx + 1, WhitespaceToken(0, 0, " "))
|
||||||
idx += 2
|
idx += 2
|
||||||
else:
|
else:
|
||||||
@ -2333,7 +2322,9 @@ class mdict(cishubase):
|
|||||||
# tag
|
# tag
|
||||||
# #class tag
|
# #class tag
|
||||||
rule.prelude.insert(idx, WhitespaceToken(0, 0, " "))
|
rule.prelude.insert(idx, WhitespaceToken(0, 0, " "))
|
||||||
rule.prelude.insert(idx, KlassToken(0, 0, divid))
|
rule.prelude.insert(
|
||||||
|
idx, LiteralToken(0, 0, "." + divid + " ")
|
||||||
|
)
|
||||||
idx += 2
|
idx += 2
|
||||||
start = False
|
start = False
|
||||||
elif token.type == "literal" and token.value == ",":
|
elif token.type == "literal" and token.value == ",":
|
||||||
@ -2364,14 +2355,10 @@ class mdict(cishubase):
|
|||||||
continue
|
continue
|
||||||
# @....{ .klas{} }
|
# @....{ .klas{} }
|
||||||
internal = parserules(internal)
|
internal = parserules(internal)
|
||||||
ser = "@"
|
_ = []
|
||||||
ser += rule.at_keyword
|
rule.content = internal
|
||||||
ser += "{"
|
rule._serialize_to(_.append)
|
||||||
for _ in internal:
|
rules[i] = shitrule("".join(_))
|
||||||
ser += _.serialize()
|
|
||||||
ser += "}"
|
|
||||||
# rule.serialize=functools.partial(__,ser)
|
|
||||||
rules[i] = shitrule(ser)
|
|
||||||
elif isinstance(rule, QualifiedRule):
|
elif isinstance(rule, QualifiedRule):
|
||||||
parseaqr(rules[i])
|
parseaqr(rules[i])
|
||||||
return rules
|
return rules
|
||||||
@ -2449,7 +2436,7 @@ class mdict(cishubase):
|
|||||||
# print(keys)
|
# print(keys)
|
||||||
for k in keys:
|
for k in keys:
|
||||||
__safe = []
|
__safe = []
|
||||||
for content in set(self.searchthread_internal(index, k, __safe)):
|
for content in sorted(set(self.searchthread_internal(index, k, __safe))):
|
||||||
results.append(self.parseashtml(content))
|
results.append(self.parseashtml(content))
|
||||||
except:
|
except:
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ class playonce:
|
|||||||
|
|
||||||
BASS_Init(-1, 44100, 0, 0, 0)
|
BASS_Init(-1, 44100, 0, 0, 0)
|
||||||
# https://www.un4seen.com/
|
# https://www.un4seen.com/
|
||||||
plugins = {".spx": "bass_spx.dll"}
|
plugins = {".spx": "bass_spx.dll", ".aac": "bass_aac.dll"}
|
||||||
|
|
||||||
pluginshandle = {}
|
pluginshandle = {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user