Compare commits
2 Commits
2e5b90bc85
...
f26a9d1bd8
Author | SHA1 | Date | |
---|---|---|---|
f26a9d1bd8
|
|||
d8651abeab
|
48
andreal.py
48
andreal.py
@ -5,6 +5,8 @@ import sys
|
||||
import zipfile
|
||||
from pathlib import Path, PurePath
|
||||
|
||||
from tqdm import tqdm
|
||||
|
||||
from common import ArcaeaApkParser, ExtractTask, extract
|
||||
|
||||
ROOT_OUTPUT_PATH = Path(sys.argv[0]).parent.absolute()
|
||||
@ -52,12 +54,23 @@ class SongParser(ArcaeaApkParser):
|
||||
continue
|
||||
|
||||
song_id = re.sub(r"^dl_", "", song_zf_path.name)
|
||||
if file_pure_path.stem == "base":
|
||||
if file_pure_path.stem in ["base", "1080_base"]:
|
||||
new_file_name_stem = song_id
|
||||
elif file_pure_path.stem == "base_night":
|
||||
elif file_pure_path.stem in ["1080_base_night", "base_night"]:
|
||||
new_file_name_stem = f"{song_id}_night"
|
||||
elif file_pure_path.stem in ["0", "1", "2", "3"]:
|
||||
new_file_name_stem = f"{song_id}_{file_pure_path.stem}"
|
||||
elif file_pure_path.stem in [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"1080_0",
|
||||
"1080_1",
|
||||
"1080_2",
|
||||
"1080_3",
|
||||
]:
|
||||
new_file_name_stem = (
|
||||
f"{song_id}_{file_pure_path.stem.replace('1080_', '')}"
|
||||
)
|
||||
else:
|
||||
continue
|
||||
|
||||
@ -69,7 +82,8 @@ class SongParser(ArcaeaApkParser):
|
||||
|
||||
|
||||
class CharParser(ArcaeaApkParser):
|
||||
CHAR_RE = r"^\d*u?(_icon)?\.png$"
|
||||
CHAR_RE = r"^\d+u?\.png$"
|
||||
CHAR_ICON_RE = r"^\d+u?_icon\.png$"
|
||||
|
||||
@property
|
||||
def OUTPUT_PATH_CHAR(self):
|
||||
@ -80,23 +94,37 @@ class CharParser(ArcaeaApkParser):
|
||||
return ROOT_OUTPUT_PATH / "Icon"
|
||||
|
||||
def parse(self):
|
||||
if (zipfile.Path(self.zf) / "assets" / "char" / "1080").exists():
|
||||
char_dir_zf_path = zipfile.Path(self.zf) / "assets" / "char" / "1080"
|
||||
else:
|
||||
char_dir_zf_path = zipfile.Path(self.zf) / "assets" / "char"
|
||||
char_zf_path_list = [zfp for zfp in char_dir_zf_path.iterdir() if zfp.is_file()]
|
||||
char_icon_dir_zf_path = zipfile.Path(self.zf) / "assets" / "char"
|
||||
char_icon_zf_path_list = [
|
||||
zfp for zfp in char_icon_dir_zf_path.iterdir() if zfp.is_file()
|
||||
]
|
||||
|
||||
tasks = []
|
||||
|
||||
for char_zf_path in char_zf_path_list:
|
||||
char_pure_path = PurePath(str(char_zf_path))
|
||||
if not re.match(self.CHAR_RE, char_pure_path.name):
|
||||
continue
|
||||
|
||||
if "_icon" in char_pure_path.stem:
|
||||
new_file_name = char_pure_path.name.replace("_icon", "")
|
||||
new_file_path = self.OUTPUT_PATH_ICON / new_file_name
|
||||
else:
|
||||
new_file_name = char_pure_path.name
|
||||
new_file_path = self.OUTPUT_PATH_CHAR / new_file_name
|
||||
|
||||
tasks.append(ExtractTask(char_zf_path, new_file_path))
|
||||
|
||||
for char_icon_zf_path in char_icon_zf_path_list:
|
||||
char_icon_pure_path = PurePath(str(char_icon_zf_path))
|
||||
if not re.match(self.CHAR_ICON_RE, char_icon_pure_path.name):
|
||||
continue
|
||||
|
||||
new_file_name = char_icon_pure_path.name.replace("_icon", "")
|
||||
new_file_path = self.OUTPUT_PATH_ICON / new_file_name
|
||||
|
||||
tasks.append(ExtractTask(char_icon_zf_path, new_file_path))
|
||||
return tasks
|
||||
|
||||
|
||||
@ -135,5 +163,5 @@ if __name__ == "__main__":
|
||||
|
||||
tasks = sp_tasks + cp_tasks
|
||||
logger.info("Extracting, please wait...")
|
||||
for task in tasks:
|
||||
for task in tqdm(tasks):
|
||||
extract(task)
|
||||
|
BIN
logo.png
BIN
logo.png
Binary file not shown.
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 112 KiB |
66
logo.svg
66
logo.svg
@ -8,7 +8,7 @@
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
sodipodi:docname="arcaea-apk-extract.svg"
|
||||
sodipodi:docname="arcaea-apk-extract.inkscape.svg"
|
||||
inkscape:export-filename="arcaea-apk-extract.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
@ -148,27 +148,6 @@
|
||||
offset="1"
|
||||
id="stop8" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#206080;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2" />
|
||||
<stop
|
||||
style="stop-color:#27a6e5;stop-opacity:1;"
|
||||
offset="0.85000002"
|
||||
id="stop3" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2"
|
||||
id="linearGradient3"
|
||||
x1="0.59705299"
|
||||
y1="115.49972"
|
||||
x2="500"
|
||||
y2="384.82227"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient7"
|
||||
@ -197,22 +176,45 @@
|
||||
x2="250"
|
||||
y2="114.21859"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2-4"
|
||||
id="linearGradient3-3"
|
||||
x1="87.5"
|
||||
y1="165.07216"
|
||||
x2="418.75003"
|
||||
y2="359.92786"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.2316808,0,0,1.2316808,-57.92018,-57.920177)" />
|
||||
<linearGradient
|
||||
id="linearGradient2-4"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#27a6e5;stop-opacity:1;"
|
||||
offset="0.1"
|
||||
id="stop2-4" />
|
||||
<stop
|
||||
style="stop-color:#206080;stop-opacity:1;"
|
||||
offset="0.89999998"
|
||||
id="stop3-0" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="图层 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3);stroke:none;stroke-width:6;stroke-linecap:round"
|
||||
id="rect1"
|
||||
width="500"
|
||||
height="500"
|
||||
x="0"
|
||||
y="0"
|
||||
rx="128"
|
||||
ry="128"
|
||||
<path
|
||||
style="display:inline;fill:url(#linearGradient3-3);fill-opacity:1;stroke:none;stroke-width:4.92672;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M -27.12816,280.79201 126.83193,9.9999998 H 373.16807 L 527.12816,280.79201 388.56413,490 H 111.43587 Z"
|
||||
id="path16"
|
||||
inkscape:label="bg"
|
||||
sodipodi:insensitive="true" />
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="display:inline;fill:#74c2e5;fill-opacity:1;stroke:none;stroke-width:4.92672;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 126.83193,9.9999998 77.91352,96.039901 H 422.08647 L 373.16807,9.9999998 Z"
|
||||
id="path7-8"
|
||||
inkscape:label="top-bg"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<g
|
||||
id="g11"
|
||||
transform="matrix(1.6981132,0,0,1.6981132,-178.77358,-293.39624)"
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.1 KiB |
Reference in New Issue
Block a user