Builds the whole curriculum in one pass: the 9 categories and 40 sub-categories from
curriculum.js, then every question from import-questions.csv.
Safe to re-run — it refuses to import on top of questions that are already there
unless you explicitly tell it to replace them.
Checking access…
1Check what is already in Firestore
Run this first. It reports how many categories and questions exist right now, so you can confirm the wipe landed before adding anything on top of it.
2Create the categories and sub-categories
Writes one questionCategories document per category, each carrying its Master / Sub Master and its list of sub-categories. Re-running overwrites those documents but never touches questions.
3Import the questions
Pick the clean.csv that
scripts/convert-raw-questions.mjs wrote — by default in
C:\dev\torah-blitz\import-out\. The file already carries the category
and sub-category IDs, so there is nothing to choose here.
To load one parsha or masechta rather than everything, import the CSV cut down to
that category. Leave Replace unticked for anything being added for the
first time — it deletes before it writes.
4Capitalize the answers
Puts a capital on the first letter of every answer already in Firestore — correct and wrong
alike. Answers starting with a number (“1st of Nissan”) or with Hebrew are
left exactly as they are. Safe to run twice; the second run finds nothing to do.
New imports are capitalized automatically, so this is only for questions that are already in.
5Load the flagged rows into the review queue
scripts/convert-raw-questions.mjs splits the workbook in two: the rows it was sure about go in
through step 3, and the rows it had to guess at, borrow an answer for, or repair are held back in
flagged.json. This puts those into the review queue so they land in front of a reviewer
on the Review screen instead of going live unseen.
Nothing loaded here is playable until it is approved there.