About
Generate quizzes from Markdown
Usage
$ quixote -h
Generate quizzes from Markdown
<https://crates.io/crates/quixote> / <https://github.com/qtfkwk/quixote>
---
Usage: quixote [OPTIONS] [PATH/GLOB]...
Arguments:
[PATH/GLOB]... One or more paths/globs
Options:
-g <DIRECTORY> Generate one or more quizzes
-a <answers.json> Grade completed quiz(zes)
-r Print readme
-h, --help Print help
-V, --version Print version
$ quixote -V
quixote 0.1.2
Example
Create one or more Markdown files with quiz questions and answers:
example/src
- Use multiple files to organize questions and enable generating quizzes from any subset.
- Write questions in one or more paragraphs, optionally with any Markdown span syntax and/or tables, images, lists, etc.
- Place answers after all question content as an unordered list with the correct answer(s) in bold/strong.
- Use a rule (
---
) between questions.
Generate a quiz:
example/1
quiz.md
: Quiz for studentsanswers.md
: Quiz with answersanswers.json
: Answer key
-
The quiz includes all questions and answers, both in random order.
-
To generate a quiz from a subset of source files, use one or more paths or globs to specify it; for example, to generate a quiz with only questions from
addition.md
andsubtraction.md
, the command is: -
Path/glob arguments:
- Absolute or relative path to a file or directory
- Use your shell's globbing
- If using the
-g
option and an argument is a directory, it converts todirectory/**/*.md
to include all*.md
files underdirectory/
. - Use built-in globbing by properly quoting and/or escaping the argument so it is not interpreted by your shell. See the reference section on globbing below for more details.
Grade a quiz:
-
Completed quiz (
period-1.json
): -
Answer key (
answers.json
):
Changelog
- 0.1.0 (2023-12-06): Initial release
- 0.1.1 (2023-12-06): Save the quiz grading report to a file
- 0.1.2 (2023-12-06): Fix typo
Reference
Globbing
?
matches any single character.*
matches any (possibly empty) sequence of characters.**
matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both**a
andb**
are invalid and will result in an error. A sequence of more than two consecutive*
characters is also invalid.[...]
matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g.[0-9]
specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid.[!...]
is the negation of[...]
, i.e. it matches and characters not in the brackets.- The metacharacters
?
,*
,[
,]
can be matched by using brackets (e.g.[?]
). When a]
occurs immediately following[
or[!
then it is interpreted as being part of, rather then ending, the character set, so]
and NOT]
can be matched by[]]
and[!]]
respectively. The-
character can be specified inside a character sequence pattern by placing it at the start or the end, e.g.[abc-]
.
See also glob
on crates.io
,
docs.rs
, or specifically the documentation for the
glob::Pattern
struct.