diff --git a/func/fetch_src.py b/func/fetch_src.py new file mode 100644 index 0000000..526b476 --- /dev/null +++ b/func/fetch_src.py @@ -0,0 +1,21 @@ +import shutil +import aiofiles +import ujson as jsonlib +from pathlib import Path + +src_dir = Path("src") +data_dir = Path("data") +pic_lists = ["avatar", "avatar_gacha", "destiny", "element"] + + +async def move_files(): + for i in pic_lists: + print(f"Moving: {i}") + src_dir_ = src_dir / i + data_dir_ = data_dir / i + datas = [file.name.split(".")[0] for file in src_dir_.glob("*")] + if data_dir_.exists(): + shutil.rmtree(data_dir_) + shutil.copytree(src_dir_, data_dir_) + async with aiofiles.open(data_dir_ / "info.json", "w", encoding="utf-8") as f: + await f.write(jsonlib.dumps(datas, indent=4, ensure_ascii=False)) diff --git a/main.py b/main.py index 3128ac5..d8b704c 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ from func.fetch_materials import fetch_materials, fetch_materials_infos, dump_ma from func.fetch_monsters import fetch_monsters, fetch_monsters_infos, dump_monsters, read_monsters from func.fetch_relics import fetch_relics, fetch_relics_infos, dump_relics, read_relics from func.fetch_raiders import get_raiders +from func.fetch_src import move_files data_path = Path("data") data_path.mkdir(exist_ok=True) @@ -58,6 +59,7 @@ async def wiki( async def bbs_photos(): await get_raiders() + await move_files() async def main( diff --git a/src/avatar/三月七.png b/src/avatar/三月七.png new file mode 100644 index 0000000..84e261b Binary files /dev/null and b/src/avatar/三月七.png differ diff --git a/src/avatar/丹恒.png b/src/avatar/丹恒.png new file mode 100644 index 0000000..3891fb8 Binary files /dev/null and b/src/avatar/丹恒.png differ diff --git a/src/avatar/佩拉.png b/src/avatar/佩拉.png new file mode 100644 index 0000000..2332256 Binary files /dev/null and b/src/avatar/佩拉.png differ diff --git a/src/avatar/停云.png b/src/avatar/停云.png new file mode 100644 index 0000000..a81f3a4 Binary files /dev/null and b/src/avatar/停云.png differ diff --git a/src/avatar/克拉拉.png b/src/avatar/克拉拉.png new file mode 100644 index 0000000..8670452 Binary files /dev/null and b/src/avatar/克拉拉.png differ diff --git a/src/avatar/卡芙卡.png b/src/avatar/卡芙卡.png new file mode 100644 index 0000000..191c9c3 Binary files /dev/null and b/src/avatar/卡芙卡.png differ diff --git a/src/avatar/姬子.png b/src/avatar/姬子.png new file mode 100644 index 0000000..9913c3e Binary files /dev/null and b/src/avatar/姬子.png differ diff --git a/src/avatar/娜塔莎.png b/src/avatar/娜塔莎.png new file mode 100644 index 0000000..fe36f05 Binary files /dev/null and b/src/avatar/娜塔莎.png differ diff --git a/src/avatar/布洛妮娅.png b/src/avatar/布洛妮娅.png new file mode 100644 index 0000000..98f8671 Binary files /dev/null and b/src/avatar/布洛妮娅.png differ diff --git a/src/avatar/希儿.png b/src/avatar/希儿.png new file mode 100644 index 0000000..3c022b7 Binary files /dev/null and b/src/avatar/希儿.png differ diff --git a/src/avatar/希露瓦.png b/src/avatar/希露瓦.png new file mode 100644 index 0000000..cf8e617 Binary files /dev/null and b/src/avatar/希露瓦.png differ diff --git a/src/avatar/开拓者_火.png b/src/avatar/开拓者_火.png new file mode 100644 index 0000000..5d9119f Binary files /dev/null and b/src/avatar/开拓者_火.png differ diff --git a/src/avatar/开拓者_物理.png b/src/avatar/开拓者_物理.png new file mode 100644 index 0000000..5551b59 Binary files /dev/null and b/src/avatar/开拓者_物理.png differ diff --git a/src/avatar/彦卿.png b/src/avatar/彦卿.png new file mode 100644 index 0000000..0b5fe36 Binary files /dev/null and b/src/avatar/彦卿.png differ diff --git a/src/avatar/景元.png b/src/avatar/景元.png new file mode 100644 index 0000000..c398854 Binary files /dev/null and b/src/avatar/景元.png differ diff --git a/src/avatar/杰帕德.png b/src/avatar/杰帕德.png new file mode 100644 index 0000000..d56b99c Binary files /dev/null and b/src/avatar/杰帕德.png differ diff --git a/src/avatar/桑博.png b/src/avatar/桑博.png new file mode 100644 index 0000000..22c2edb Binary files /dev/null and b/src/avatar/桑博.png differ diff --git a/src/avatar/瓦尔特.png b/src/avatar/瓦尔特.png new file mode 100644 index 0000000..d1a1ed2 Binary files /dev/null and b/src/avatar/瓦尔特.png differ diff --git a/src/avatar/白露.png b/src/avatar/白露.png new file mode 100644 index 0000000..fc18afd Binary files /dev/null and b/src/avatar/白露.png differ diff --git a/src/avatar/素裳.png b/src/avatar/素裳.png new file mode 100644 index 0000000..3dc8b08 Binary files /dev/null and b/src/avatar/素裳.png differ diff --git a/src/avatar/罗刹.png b/src/avatar/罗刹.png new file mode 100644 index 0000000..c7a1ede Binary files /dev/null and b/src/avatar/罗刹.png differ diff --git a/src/avatar/艾丝妲.png b/src/avatar/艾丝妲.png new file mode 100644 index 0000000..4d54031 Binary files /dev/null and b/src/avatar/艾丝妲.png differ diff --git a/src/avatar/虎克.png b/src/avatar/虎克.png new file mode 100644 index 0000000..30bc5ad Binary files /dev/null and b/src/avatar/虎克.png differ diff --git a/src/avatar/银狼.png b/src/avatar/银狼.png new file mode 100644 index 0000000..d90d6fe Binary files /dev/null and b/src/avatar/银狼.png differ diff --git a/src/avatar/阿兰.png b/src/avatar/阿兰.png new file mode 100644 index 0000000..61fc860 Binary files /dev/null and b/src/avatar/阿兰.png differ diff --git a/src/avatar/青雀.png b/src/avatar/青雀.png new file mode 100644 index 0000000..367e8a1 Binary files /dev/null and b/src/avatar/青雀.png differ diff --git a/src/avatar/黑塔.png b/src/avatar/黑塔.png new file mode 100644 index 0000000..c44966c Binary files /dev/null and b/src/avatar/黑塔.png differ diff --git a/src/avatar_gacha/三月七.png b/src/avatar_gacha/三月七.png new file mode 100644 index 0000000..45cfc49 Binary files /dev/null and b/src/avatar_gacha/三月七.png differ diff --git a/src/avatar_gacha/丹恒.png b/src/avatar_gacha/丹恒.png new file mode 100644 index 0000000..61d893c Binary files /dev/null and b/src/avatar_gacha/丹恒.png differ diff --git a/src/avatar_gacha/佩拉.png b/src/avatar_gacha/佩拉.png new file mode 100644 index 0000000..55eff6c Binary files /dev/null and b/src/avatar_gacha/佩拉.png differ diff --git a/src/avatar_gacha/停云.png b/src/avatar_gacha/停云.png new file mode 100644 index 0000000..b3c0421 Binary files /dev/null and b/src/avatar_gacha/停云.png differ diff --git a/src/avatar_gacha/克拉拉.png b/src/avatar_gacha/克拉拉.png new file mode 100644 index 0000000..fa4904a Binary files /dev/null and b/src/avatar_gacha/克拉拉.png differ diff --git a/src/avatar_gacha/卡芙卡.png b/src/avatar_gacha/卡芙卡.png new file mode 100644 index 0000000..4c65989 Binary files /dev/null and b/src/avatar_gacha/卡芙卡.png differ diff --git a/src/avatar_gacha/姬子.png b/src/avatar_gacha/姬子.png new file mode 100644 index 0000000..ddd8214 Binary files /dev/null and b/src/avatar_gacha/姬子.png differ diff --git a/src/avatar_gacha/娜塔莎.png b/src/avatar_gacha/娜塔莎.png new file mode 100644 index 0000000..ab2a1f9 Binary files /dev/null and b/src/avatar_gacha/娜塔莎.png differ diff --git a/src/avatar_gacha/布洛妮娅.png b/src/avatar_gacha/布洛妮娅.png new file mode 100644 index 0000000..01a6abe Binary files /dev/null and b/src/avatar_gacha/布洛妮娅.png differ diff --git a/src/avatar_gacha/希儿.png b/src/avatar_gacha/希儿.png new file mode 100644 index 0000000..02224cc Binary files /dev/null and b/src/avatar_gacha/希儿.png differ diff --git a/src/avatar_gacha/希露瓦.png b/src/avatar_gacha/希露瓦.png new file mode 100644 index 0000000..a3668a8 Binary files /dev/null and b/src/avatar_gacha/希露瓦.png differ diff --git a/src/avatar_gacha/开拓者_火.png b/src/avatar_gacha/开拓者_火.png new file mode 100644 index 0000000..effbb6b Binary files /dev/null and b/src/avatar_gacha/开拓者_火.png differ diff --git a/src/avatar_gacha/开拓者_物理.png b/src/avatar_gacha/开拓者_物理.png new file mode 100644 index 0000000..36f6d5b Binary files /dev/null and b/src/avatar_gacha/开拓者_物理.png differ diff --git a/src/avatar_gacha/彦卿.png b/src/avatar_gacha/彦卿.png new file mode 100644 index 0000000..a94111f Binary files /dev/null and b/src/avatar_gacha/彦卿.png differ diff --git a/src/avatar_gacha/景元.png b/src/avatar_gacha/景元.png new file mode 100644 index 0000000..b2067df Binary files /dev/null and b/src/avatar_gacha/景元.png differ diff --git a/src/avatar_gacha/杰帕德.png b/src/avatar_gacha/杰帕德.png new file mode 100644 index 0000000..9928e0c Binary files /dev/null and b/src/avatar_gacha/杰帕德.png differ diff --git a/src/avatar_gacha/桑博.png b/src/avatar_gacha/桑博.png new file mode 100644 index 0000000..0cad3fa Binary files /dev/null and b/src/avatar_gacha/桑博.png differ diff --git a/src/avatar_gacha/瓦尔特.png b/src/avatar_gacha/瓦尔特.png new file mode 100644 index 0000000..7a09991 Binary files /dev/null and b/src/avatar_gacha/瓦尔特.png differ diff --git a/src/avatar_gacha/白露.png b/src/avatar_gacha/白露.png new file mode 100644 index 0000000..8ea819e Binary files /dev/null and b/src/avatar_gacha/白露.png differ diff --git a/src/avatar_gacha/素裳.png b/src/avatar_gacha/素裳.png new file mode 100644 index 0000000..beff2ac Binary files /dev/null and b/src/avatar_gacha/素裳.png differ diff --git a/src/avatar_gacha/罗刹.png b/src/avatar_gacha/罗刹.png new file mode 100644 index 0000000..3ce9f3b Binary files /dev/null and b/src/avatar_gacha/罗刹.png differ diff --git a/src/avatar_gacha/艾丝妲.png b/src/avatar_gacha/艾丝妲.png new file mode 100644 index 0000000..66f769e Binary files /dev/null and b/src/avatar_gacha/艾丝妲.png differ diff --git a/src/avatar_gacha/虎克.png b/src/avatar_gacha/虎克.png new file mode 100644 index 0000000..f90f417 Binary files /dev/null and b/src/avatar_gacha/虎克.png differ diff --git a/src/avatar_gacha/银狼.png b/src/avatar_gacha/银狼.png new file mode 100644 index 0000000..77d381d Binary files /dev/null and b/src/avatar_gacha/银狼.png differ diff --git a/src/avatar_gacha/阿兰.png b/src/avatar_gacha/阿兰.png new file mode 100644 index 0000000..6adc1eb Binary files /dev/null and b/src/avatar_gacha/阿兰.png differ diff --git a/src/avatar_gacha/青雀.png b/src/avatar_gacha/青雀.png new file mode 100644 index 0000000..0131c92 Binary files /dev/null and b/src/avatar_gacha/青雀.png differ diff --git a/src/avatar_gacha/黑塔.png b/src/avatar_gacha/黑塔.png new file mode 100644 index 0000000..7777591 Binary files /dev/null and b/src/avatar_gacha/黑塔.png differ diff --git a/src/destiny/丰饶.png b/src/destiny/丰饶.png new file mode 100644 index 0000000..d396e4a Binary files /dev/null and b/src/destiny/丰饶.png differ diff --git a/src/destiny/同谐.png b/src/destiny/同谐.png new file mode 100644 index 0000000..3028983 Binary files /dev/null and b/src/destiny/同谐.png differ diff --git a/src/destiny/存护.png b/src/destiny/存护.png new file mode 100644 index 0000000..cec1c54 Binary files /dev/null and b/src/destiny/存护.png differ diff --git a/src/destiny/巡猎.png b/src/destiny/巡猎.png new file mode 100644 index 0000000..7e16fdf Binary files /dev/null and b/src/destiny/巡猎.png differ diff --git a/src/destiny/智识.png b/src/destiny/智识.png new file mode 100644 index 0000000..4ee7920 Binary files /dev/null and b/src/destiny/智识.png differ diff --git a/src/destiny/毁灭.png b/src/destiny/毁灭.png new file mode 100644 index 0000000..6884016 Binary files /dev/null and b/src/destiny/毁灭.png differ diff --git a/src/destiny/虚无.png b/src/destiny/虚无.png new file mode 100644 index 0000000..a01d9c9 Binary files /dev/null and b/src/destiny/虚无.png differ diff --git a/src/element/冰.png b/src/element/冰.png new file mode 100644 index 0000000..96ff2ed Binary files /dev/null and b/src/element/冰.png differ diff --git a/src/element/火.png b/src/element/火.png new file mode 100644 index 0000000..938b9bf Binary files /dev/null and b/src/element/火.png differ diff --git a/src/element/物理.png b/src/element/物理.png new file mode 100644 index 0000000..5c55314 Binary files /dev/null and b/src/element/物理.png differ diff --git a/src/element/虚数.png b/src/element/虚数.png new file mode 100644 index 0000000..2c35d18 Binary files /dev/null and b/src/element/虚数.png differ diff --git a/src/element/量子.png b/src/element/量子.png new file mode 100644 index 0000000..2da81cf Binary files /dev/null and b/src/element/量子.png differ diff --git a/src/element/雷.png b/src/element/雷.png new file mode 100644 index 0000000..1daf48b Binary files /dev/null and b/src/element/雷.png differ diff --git a/src/element/风.png b/src/element/风.png new file mode 100644 index 0000000..b80e1f6 Binary files /dev/null and b/src/element/风.png differ