qqg is a rust program designed to let you create interactive quizzes blazingly fast, right in the terminal.
qqg version 2.0.0 is the third breaking release of qqg, after 1.0.0 and 0.1.0, filled with new features and code improvements.
- simple and portable text format for structured quizzes
- free and open-source, under GPL-3.0-or-later
- fast, handmade parser with robust lexing
- colored output and symbols
- 0 dependencies, only
std
Tip
if your stdout is not a terminal, or the NO_COLOR environment variable is set, qqg doesn't use colors
using cargo, you can run:
cargo install quick-quiz-generatoryou can also see our github releases for your platform. since 2.0.0, the following binaries are released:
- x86_64-windows
- aarch64-windows
- x86_64-linux
- aarch64-linux
- x86_64-apple
- aarch64-apple
qqg parses .qq (quick-quiz) files, and runs them as quizzes. to get started, create a file test.qq and write:
title "quick-quiz-generator" by "sarkar-segfault" pass 1
question "what is 1 + 1?" {
answer {
"2"
}
value 1
}
Tip
qqg supports comments, commas, unicode strings, and negative values in input too.
run it using the following command:
qqg start test.qqfor some sample quizzes, see samples/.
qqg has 4 main subcommands:
| subcommand | description |
|---|---|
help |
prints help about the cli |
token <input.qq> |
tokenizes the file and prints its token list |
parse <input.qq> |
tokenizes and parses the file and prints the syntax tree |
start <input.qq> |
tokenizes, parses and runs the file as an interactive quiz |
most of the time, you'll only use help and start; the others are mostly for testing.
qqg was started as a one-man project by me, but i would appreciate any help i can get! just make an issue or pull request at the repo, and i promise i'll check it out.