CLI Reference
mcqpy
Command line interface for mcqpy.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--version |
boolean | Show the version and exit. | False |
--help |
boolean | Show this message and exit. | False |
Subcommands
- build: Build the quiz PDF from question files based on the provided configuration.
- check-latex: Check LaTeX installation and configuration.
- export: Commands for exporting browser-ready quiz artifacts.
- grade: Grade student submissions.
- init: Initialize a new quiz project
- question:
- utils:
build
Build the quiz PDF from question files based on the provided configuration. This command reads the quiz configuration, selects questions from the question bank, and generates the quiz PDF along with a solution PDF.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-c, --config |
path | Path to the config file | config.yaml |
--help |
boolean | Show this message and exit. | False |
check-latex
Check LaTeX installation and configuration.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
export
Commands for exporting browser-ready quiz artifacts.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- decode-token: Decode a quiz token to its public URL.
- encode-token: Encode a public quiz bundle URL.
- web: Export a static web quiz bundle.
decode-token
Decode a quiz token to its public URL.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
encode-token
Encode a public quiz bundle URL.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
web
Export a static web quiz bundle.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-c, --config |
path | Path to the quiz config file. | config.yaml |
-o, --output-dir |
path | Directory for the exported bundle. Defaults to output/web/ |
None |
--asset-base-url |
text | Optional published base URL used to rewrite copied local assets. | None |
--help |
boolean | Show this message and exit. | False |
grade
Grade student submissions. Generates a grade report in the specified format (Excel or CSV). Students submissions are expected to be in submission directory specified in the config file.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-c, --config |
path | Path to the config file | config.yaml |
-v, --verbose |
boolean | Enable verbose output | False |
-f, --file-format |
choice (xlsx | csv) |
Output format for the grades | xlsx |
-a, --analysis |
boolean | Generate question analysis reports | False |
--help |
boolean | Show this message and exit. | False |
init
Initialize a new quiz project
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-f, --file-name |
text | Name of the output PDF file | quiz.pdf |
-mqd, --make-questions-directory |
boolean | Create a questions directory | True |
-o, --output-directory |
text | Directory for output files | output |
-s, --submission-directory |
text | Directory for student submissions | submissions |
--help |
boolean | Show this message and exit. | False |
question
Commands related to question management.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- check-tags: Check tags in questions
- init: Initialize question file.
- render: Render a question as PDF. Useful to check LaTeX formatting.
- validate: Validate question files
check-tags
Check tags in questions
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
init
Initialize question file.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
render
Render a question as PDF. Useful to check LaTeX formatting.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
validate
Validate question files
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
utils
Utility commands for MCQPy.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- autofill: Make answered versions of quiz to test mcqpy functionality
autofill
Make answered versions of quiz to test mcqpy functionality
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-c, --config |
path | Path to the config file | config.yaml |
-n, --num-forms |
integer | Number of filled forms to generate | 10 |
--correct |
boolean | Fill forms with correct answers | False |
--help |
boolean | Show this message and exit. | False |