diff --git a/run.py b/run.py index 819f440..abf9ac0 100644 --- a/run.py +++ b/run.py @@ -382,9 +382,20 @@ def step_build_all(args, examples_cache: dict, freq_cache: dict, conjugations: d def step_conjugations(args): - """Step 6 — extract conjugations (returns data; building handled by step_build_all).""" + """Step 6 — extract conjugations (returns data; building handled by step_build_all). + + --skip-conjugations skips re-extraction from pealim.com but still loads + from cache so conj deck variants are built correctly. + """ + conj_cache = DATA_DIR / "conjugations.json" + if args.skip_conjugations: - logger.info("[6] Skipping conjugations (--skip-conjugations)") + if conj_cache.exists(): + logger.info("[6] --skip-conjugations: loading from cache …") + with open(conj_cache) as f: + import json as _json + return _json.load(f) + logger.info("[6] --skip-conjugations: no cache found, skipping conj decks") return None verbs_file = Path(__file__).parent / "verbs_input.txt" @@ -392,9 +403,7 @@ def step_conjugations(args): logger.info("[6] verbs_input.txt not found — skipping conjugation deck") return None - # Use cached conjugations.json if available (skip re-extraction) - conj_cache = DATA_DIR / "conjugations.json" - if conj_cache.exists() and not getattr(args, 'refresh_conjugations', False): + if conj_cache.exists(): logger.info("[6] Using cached conjugations.json …") with open(conj_cache) as f: import json as _json