Introduces new core abstractions and module management classes, adds several new modules (modern cache, REST API, SEO enhancement), and removes deprecated/disabled assets and code. Updates vendor dependencies, including Symfony components and php-opencc, and cleans up related files. This refactor improves code organization, extensibility, and modernizes the plugin's architecture.
79 lines
1.7 KiB
Text
79 lines
1.7 KiB
Text
package(default_visibility = ["//visibility:public"])
|
|
|
|
genrule(
|
|
name = "merge_TWPhrases",
|
|
srcs = [
|
|
"TWPhrasesIT.txt",
|
|
"TWPhrasesName.txt",
|
|
"TWPhrasesOther.txt",
|
|
],
|
|
outs = ["TWPhrases.txt"],
|
|
cmd = "$(location //data/scripts:merge) " +
|
|
"$(SRCS) $(OUTS)",
|
|
tools = ["//data/scripts:merge"],
|
|
)
|
|
|
|
[
|
|
genrule(
|
|
name = "reverse_" + txt,
|
|
srcs = [txt + ".txt"],
|
|
outs = [txt + "Rev.txt"],
|
|
cmd = "$(location //data/scripts:reverse) " +
|
|
"$(SRCS) $(OUTS)",
|
|
tools = ["//data/scripts:reverse"],
|
|
)
|
|
for txt in [
|
|
"TWVariants",
|
|
"TWPhrases",
|
|
"HKVariants",
|
|
"JPVariants",
|
|
]
|
|
]
|
|
|
|
TEXT_DICTS = glob(["*.txt"]) + [
|
|
"TWPhrases.txt",
|
|
"TWVariantsRev.txt",
|
|
"TWPhrasesRev.txt",
|
|
"HKVariantsRev.txt",
|
|
"JPVariantsRev.txt",
|
|
]
|
|
|
|
[
|
|
genrule(
|
|
name = "generate_bin_" + txt[:-4],
|
|
srcs = [txt],
|
|
outs = [txt.replace(".txt", ".ocd2")],
|
|
cmd = "$(location //src/tools:dict_converter) " +
|
|
"--input $(location " + txt + ") " +
|
|
"--output $(OUTS) " +
|
|
"--from text " +
|
|
"--to ocd2",
|
|
tools = ["//src/tools:dict_converter"],
|
|
)
|
|
for txt in TEXT_DICTS
|
|
]
|
|
|
|
filegroup(
|
|
name = "text_dictionaries",
|
|
srcs = TEXT_DICTS,
|
|
)
|
|
|
|
filegroup(
|
|
name = "binary_dictionaries",
|
|
srcs = [txt.replace(".txt", ".ocd2") for txt in TEXT_DICTS],
|
|
)
|
|
|
|
cc_test(
|
|
name = "dictionary_test",
|
|
srcs = ["DictionaryTest.cpp"],
|
|
data = [
|
|
":binary_dictionaries",
|
|
":text_dictionaries",
|
|
],
|
|
deps = [
|
|
"//src:lexicon",
|
|
"//src:marisa_dict",
|
|
"//src:utf8_util",
|
|
"@googletest//:gtest_main",
|
|
],
|
|
)
|