Parsers for amateur radio question pools
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
exam_schema.json
parse_nz.py

README.md

ham-exam

Parsers for multiple-choice question pools for amateur and commercial radio.

Many radio exams are generated by selecting multiple-choice questions from a question pool. The question pools are often available to the public. The following parsers extract the questions from various pool formats and convert them to a format described by a common JSON schema.

Schema

The JSON schema used by the parsers is available in exam_schema.json.

Parsers

Countries who publish their question pools tend to produce them in distinct and incompatible formats, hence the reason for this project. The following parsers handle the respective formats for exams in different countries.

New Zealand

New Zealand amateur radio has a single amateur radio licence class and exam; the General User Radio Licence for Amateur Radio Operators (GURL). The exam question pool is maintained by the national radio association, NZART, who publish the question pool both as a PDF and in plaintext format via an exam generator tool.

The parse_nz.py parser accepts the exam generator zip file distributed by NZART and produces a directory containing a JSON file of the exam questions, and an associated set of figures referenced by some questions in that exam.

Requirements

parse_nz.py requires Python 3.4+. It has been tested on Ubuntu 16.04 LTS which has Python 3.5. No additional Python libraries beyond the standard library are needed.

Usage

The following shows how to generate the exam JSON from the current (as of this writing) GURL question pool. Just in case, it wouldn't hurt to check the NZART site for any new releases since these steps were written. As of this writing the last update was in March 2017.

In this example, the exam generator zip distribution is downloaded from NZART, and then provided to the parser:

git clone git@github.com:nickbp/ham-exam
cd ham-exam/ && rm -rf out/
curl -O https://www.nzart.org.nz/assets/exam/NZART-Exam-generator17b.zip
./parse_nz.py out NZART-*.zip

The distribution may also be passed directly to the parser via stdin:

git clone git@github.com:nickbp/ham-exam
cd ham-exam/ && rm -rf out/
curl https://www.nzart.org.nz/assets/exam/NZART-Exam-generator17b.zip | ./parse_nz.py out

After running the parser as above, there will be an out/ directory with an exam.json file containing the exam questions, along with several image files which are referenced by certain questions within exam.json.

ls out/
cwtx.gif     dipole.gif  fmrx.gif  hfsta.gif  mosfet.gif  pnp.gif    ssbrx.gif  tetrode.gif
digista.gif  exam.json   fmtx.gif  jfet.gif   npn.gif     regps.gif  ssbtx.gif  yagi.gif

United States

United States amateur radio has three exams and license classes, namely Technician, General, and Amateur Extra. The exam pools for each exam type is maintained by a consortium of VEC organizations, NCVEC, who publish new versions of each exam pool every four years (plus occasional minor fixes), in .doc (text) and PDF (image) formats.

The parse_us.py parser accepts the files distributed by NCVEC and produces a directory containing a JSON file of the exam questions, along with the associated figures referenced by some questions in that exam.

Requirements

parse_us.py requires Python 3.4+. It has been tested on Ubuntu 16.04 LTS which has Python 3.5. No additional Python libraries beyond the standard library are needed.

Usage

The following shows how to generate the exam JSON from the current (as of this writing) US ham question pools. You should check the NCVEC site in case the question pools have had any updates since these steps were written. As of this writing the last updates for each exam class were: Technician=Dec 2013 (expires Jul 2018), General=Feb 2015 (expires Jul 2019), Extra=March 2016 (expires Jul 2020).

WIP: Provide example steps here once the parser's actually finished