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.
- grade: Grade student submissions.
- init: Initialize a new quiz project
- question:
- utils:
mcqpy 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 |
mcqpy check-latex
Check LaTeX installation and configuration.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
mcqpy 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 |
mcqpy 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 |
mcqpy 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
mcqpy question check-tags
Check tags in questions
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
mcqpy question init
Initialize question file.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
mcqpy question 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 |
mcqpy question validate
Validate question files
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
mcqpy 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
- check-filter: Check that filter expressions are valid
mcqpy utils 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 |
mcqpy utils check-filter
Check that filter expressions are valid
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-c, --config |
path | Path to the config file | Sentinel.UNSET |
-fn, --filter-name |
text | Name of the filter to check | Sentinel.UNSET |
-fp, --filter-params |
text | Parameters of the filter as a YAML string | Sentinel.UNSET |
-y, --yaml_input |
text | YAML input specifying one or more filters to check | Sentinel.UNSET |
--help |
boolean | Show this message and exit. | False |