-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
duoduoffff
committed
May 10, 2022
1 parent
f4db8a2
commit 2aa81c7
Showing
9 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /usr/local/bin/python3 | ||
|
||
artifactExcelConfigData = "/ExcelBinOutput/ReliquaryExcelConfigData.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#! /usr/local/bin/python3 | ||
|
||
import os, json | ||
|
||
import sys | ||
sys.path.append("..") | ||
from Common import load | ||
from Common import conf | ||
from Common import file | ||
from Common import dedup | ||
from Common import sanitize | ||
from Common import getNameByTextMapId as text | ||
|
||
from . import config | ||
|
||
def getAllNames(): | ||
objects = [] | ||
|
||
basePath = conf.dataPath | ||
combinedPath = "{0}/{1}".format(basePath, config.artifactExcelConfigData) | ||
allArtifacts = file.FileOperations.readAsJson(combinedPath) | ||
|
||
result = [] | ||
for item in allArtifacts: | ||
result.append(item["nameTextMapHash"]) | ||
|
||
return result | ||
|
||
def getReadableNames(textSea, id): | ||
return text.get(textSea, id) | ||
|
||
def exec(textSea): | ||
print("Converting Artifacts...") | ||
all = [] | ||
artifacts = getAllNames() | ||
for artifact in artifacts: | ||
readable = getReadableNames(textSea, artifact) | ||
if (readable and len(readable) > 0): | ||
readable = sanitize.removeBrackets(readable) | ||
readable = sanitize.removeMinusChar(readable) | ||
readable = sanitize.removeMiddot(readable) | ||
readable = sanitize.removeDSL(readable) | ||
readable = sanitize.removeNonChineseChars(readable) | ||
if(readable): | ||
all.append(readable) | ||
|
||
# print(all) | ||
all = dedup.exec(all) | ||
print("Converted {0} items.\n".format(str(len(all)))) | ||
return all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters