-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathExport_Data.py
More file actions
41 lines (36 loc) · 1.09 KB
/
Export_Data.py
File metadata and controls
41 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import argparse
from time import monotonic
from loader.Database import DBViewIndex
from exporter.Adventurers import CharaData
from exporter.Dragons import DragonData
from exporter.Enemy import EnemyParam
from exporter.Weapons import WeaponBody, WeaponType
from exporter.Wyrmprints import AbilityCrest
from exporter.BattleRoyal import BattleRoyalUnit, BattleRoyalCharaSkin
# from exporter.Shared import (
# ActionCondition,
# PlayerActionHitAttribute,
# PlayerAction,
# AbilityData,
# )
CLASSES = [
CharaData,
DragonData,
EnemyParam,
WeaponBody,
AbilityCrest,
WeaponType,
BattleRoyalUnit,
BattleRoyalCharaSkin,
]
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Export data from database.")
parser.add_argument("-o", type=str, help="output directory", default="out")
args = parser.parse_args()
start = monotonic()
index = DBViewIndex()
views = {}
for view_class in CLASSES:
view = view_class(index)
view.export_all_to_folder(out_dir=args.o)
print(f"\ntotal: {monotonic()-start:.4f}s", flush=True)