1
0

refactor: refactor enum migration but not finished

This commit is contained in:
2026-01-26 22:52:56 +08:00
parent c68bdce37b
commit 9cb4d50f22
22 changed files with 669 additions and 54 deletions

View File

@@ -0,0 +1,28 @@
import os
import enum
from pathlib import Path
class CKParts(enum.StrEnum):
CK2 = "CK2"
VxMath = "VxMath"
def _get_root_directory() -> Path:
enums_migration_root = os.environ.get("ENUMS_MIGRATION_ROOT", None)
if enums_migration_root is None:
return Path(__file__).resolve().parent.parent
else:
return Path(enums_migration_root).resolve()
def get_input_file_path(filename: str) -> Path:
return _get_root_directory() / "Intermediate" / filename
def get_output_file_path(filename: str) -> Path:
return _get_root_directory() / "Output" / filename
def get_template_directory() -> Path:
return Path(__file__).resolve().parent / "templates"