From b975b445caf529e744f59a59728ebefc18b225e2 Mon Sep 17 00:00:00 2001 From: drjones Date: Tue, 1 Sep 2026 13:35:16 -0700 Subject: [PATCH] Cleanup: remove superseded v1 build script --- add_wa_prep.py | 121 ------------------------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 add_wa_prep.py diff --git a/add_wa_prep.py b/add_wa_prep.py deleted file mode 100644 index 94cc944..0000000 --- a/add_wa_prep.py +++ /dev/null @@ -1,121 +0,0 @@ -import json, sys -sys.path.insert(0, "/Users/drjones/pest-nocturne") -from wa_exam_data import WAEXAM - -p = "/Users/drjones/pest-nocturne/index.html" -s = open(p).read() - -# 1. Add WA Prep tab to VIEWS -old_views = 'const VIEWS=[["home","Suite"],["field","Field Guide"],["keys","Keys"],["house","22 Points"],["cards","Flashcards"],["exam","Exam"],["gloss","Glossary"],["wa","WA Cert"]];' -new_views = 'const VIEWS=[["home","Suite"],["field","Field Guide"],["keys","Keys"],["house","22 Points"],["cards","Flashcards"],["exam","Exam"],["gloss","Glossary"],["wa","WA Cert"],["waprep","WA Prep"]];' -assert old_views in s, "VIEWS not found" -s = s.replace(old_views, new_views) - -# 2. Add section -old_sec = '
' -new_sec = old_sec + '\n
' -assert old_sec in s, "v-wa section not found" -s = s.replace(old_sec, new_sec) - -# 3. Build the WA Prep view + quiz (self-contained) -wa_data_json = json.dumps(WAEXAM) # [{cat,q,a:[...],c,x},...] - -RENDER = r''' - - -'''.replace('__WADATA__', wa_data_json) - -s = s.rstrip() + '\n' + RENDER + '\n' - -open(p, "w").write(s) -print(f"injected WA Prep view with {len(WAEXAM)} questions; size {len(s)}")