I wrote this to generate "matching" style quizzes for my kids to practice/study with. I've also added "multiple choice" because my kids needed that too.
The input file needs to be a plain text file in the format:
Some word: Some definition
Some phrase: Another definition
It will generate html that you can print with either randomized quizzes or an answer key.
I just use bare tabulate
HTML output for matching and some dumb
CSS/JavaScript to make it friendlier. This is ugly "print raw html"
out of laziness vs nice templates or something.
Here's an example answer key.
Here's an example quiz.
Here's an example answer key.
Here's an example quiz.
This uses normal pipenv
junk to manage dependencies. So yeah.
Usage: matching.py [OPTIONS] INFILE
Options:
-k, --key / --no-key Output answer key
-o, --outfile FILENAME
--help Show this message and exit.
Multiple choice will take an OUTPATH with out without a '.html' extension.
It will strip that extension and make an OUTPATH.key.html
and an
OUTPATH.html
file be default. Having a key per-text is more useful here.
Usage: multiple_choice.py [OPTIONS] INFILE OUTPATH
Options:
-k, --key / --no-key Create answer key as well
-n, --number INTEGER Number of choices
--help Show this message and exit.
I'm also just sticking my kids' data in the data directory. You can discard that. The definitions really stink to me, but it's what's on the test, so whatever.
This is licensed under the MIT license. You may do whatever you like under those terms.
Things I should do if I get around to it are documented in the TODO file. I may not get around to them. PRs for those or bugs or whatever are appreciated.