A simple markup language to create beautiful quiz and flashcard callouts for Obsidian.
This project is a companion tool for CBT Exam Simulator. While cbt-exam runs interactive exams within Obsidian, FlashQuiz allows you to statically render those same question files into beautiful, collapsible callouts for study notes.
- Standardized Format: Uses the FlashQuiz Specification shared with CBT Exam Simulator.
- 7 Question Types: Multiple Choice, Select All, True/False, Fill in the Blank, Matching, Short Answer, Long Answer.
- Simple Syntax: Just add
@mc,@tf, etc. before your questions. - Content Preservation: Keeps headers, text notes, and YAML frontmatter intact in the output.
- Zero-Config: Works standalone with no plugins required (just CSS/Callouts).
# Clone the repository
git clone https://github.com/nazdridoy/obsidian-flashquiz.git
# Or just download flashquiz.py directlypython3 flashquiz.py input.md > output.mdFlashQuiz files are standard Markdown files with a specific structure. They can be used both with this script (to generate study notes) and with the CBT Exam Simulator plugin (to take interactive exams).
You can configure quiz settings at the beginning of the file. Note: These settings are primarily used by the CBT Exam Simulator plugin but are good practice to include.
---
quiz-title: "Science Quiz"
time-limit: 15
pass-score: 80
shuffle: true
show-answer: true
exam-range: -
---| Marker | Type | Answer Format |
|---|---|---|
@mc |
Multiple Choice | = b |
@sata |
Select All That Apply | = a, c, e |
@tf |
True/False | = true / = false |
@fib |
Fill in the Blank | = answer1, answer2 |
@match |
Matching | Left | Right pairs |
@sa |
Short Answer | = text |
@la |
Long Answer | = text |
@mc 1) Which planet is closest to the Sun?
a) Venus
b) Mercury
c) Mars
d) Earth
= b
@sata 2) Which are prime numbers?
a) 2
b) 4
c) 7
d) 9
= a, c
@tf 3) HTML is a programming language.
= false
@fib 4) The Battle of `____` was fought in `____`.
= Gettysburg, 1863
@match 5) Match the capital to its country.
Tokyo | Japan
Paris | France
Berlin | Germany
(Group B is automatically shuffled in the output)
@sa 6) Who invented the telephone?
= Alexander Graham Bell
Text ending with ) at the start of a question gets bolded automatically.
| Input | Output |
|---|---|
@mc 1) Question |
**1)** Question |
@mc 1. Question |
1. Question (no bold) |
| Feature | FlashQuiz Script | CBT Exam Plugin |
|---|---|---|
| Output | Static Markdown (Callouts) | Interactive Exam View |
| Dependencies | Python 3 | Obsidian Plugin |
| Interactivity | Low (Fold/Unfold answers) | High (Timer, Scoring, Nav) |
| Best For | Study notes, Flashcards | Taking timed exams |
This project is licensed under the MIT License. See the LICENSE file for details.
Issues and PRs welcome!