An automated pipeline that turns the official FCC amateur radio exam question pools into Anki flashcard decks. It scrapes the latest question pools from NCVEC, parses the .docx files, and generates .apkg decks directly using genanki — no running Anki instance needed. Covers all three license classes: Technician, General, and Extra — about 1,300 questions total, with all pool diagrams (circuit schematics, Smith charts, antenna patterns) embedded directly in the cards.
The NCVEC rotates question pools on a 4-year cycle (effective July 1st). Rather than hardcoding URLs, the script scrapes the NCVEC index page to discover the current pools dynamically. When a new pool drops, running just pulls the latest .docx, downloads the associated figures, parses everything, and rebuilds the decks.
How it works
- Discover — scrape the NCVEC index to find the current question pool page for each license class
- Download — fetch the .docx file and all associated figure files (individual JPGs, SVG archives, single-figure PDFs) from each pool page
- Parse — extract questions with regex (
T1A01 (C) [97.1]→ question ID, correct answer, FCC citation), strip non-question content (syllabus headers, subelement descriptions) - Format — write to a
~~-delimited text file, one question block per card - Build — read the text file, detect “Figure X-Y” references, match them to downloaded images via normalized keys, inject
<img>tags, and generate Anki notes withgenanki(front: question + options + diagram, back: answer letter), tagged by subelement (e.g.T1A,G2B,E7F)
Each class gets its own deck (technician_class, general_class, extra_class) exported as .apkg files. NCVEC provides figures in different formats per class — individual JPGs for Technician, a PDF for General, and an SVG zip for Extra — so the scraper handles all three and normalizes them into the figures directory for the build step.
Current pools
| Class | Pool | Questions | Figures |
|---|---|---|---|
| Technician | 2026–2030 | 375 | 3 |
| General | 2023–2027 | 390 | 1 |
| Extra | 2024–2028 | 550 | 10 |
Usage
Pre-built .apkg decks are included in the repo — just import them into Anki. To rebuild from scratch:
just setup # install Python dependencies (via mise + uv)
just update # download and parse latest pools + figures
just build # build all decks from parsed pools
just build-class tech # build a single class
just dry-run # preview without downloading