update
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(PROJECT_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(PROJECT_ROOT))
|
||||
|
||||
from app.services.workbook_inspector import summarize_workbook
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="Inspect the KSP workbook structure.")
|
||||
parser.add_argument(
|
||||
"--path",
|
||||
default=os.getenv("WORKBOOK_PATH", "KSP Engine Tweak Chart.xlsx"),
|
||||
help="Path to the workbook file.",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
summary = summarize_workbook(args.path)
|
||||
print(json.dumps(summary, ensure_ascii=False, indent=2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user