Skip to content

nazdridoy/obsidian-flashquiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Obsidian FlashQuiz

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.

Features

  • 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).

Installation

# Clone the repository
git clone https://github.com/nazdridoy/obsidian-flashquiz.git

# Or just download flashquiz.py directly

Usage

python3 flashquiz.py input.md > output.md

FlashQuiz Format Specification

FlashQuiz 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).

YAML Frontmatter

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: -
---

Syntax Overview

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

Examples

Multiple Choice (@mc)

@mc 1) Which planet is closest to the Sun?
a) Venus
b) Mercury
c) Mars
d) Earth
= b

Select All That Apply (@sata)

@sata 2) Which are prime numbers?
a) 2
b) 4
c) 7
d) 9
= a, c

True/False (@tf)

@tf 3) HTML is a programming language.
= false

Fill in the Blank (@fib)

@fib 4) The Battle of `____` was fought in `____`.
= Gettysburg, 1863

Matching (@match)

@match 5) Match the capital to its country.
Tokyo | Japan
Paris | France
Berlin | Germany

(Group B is automatically shuffled in the output)

Short/Long Answer (@sa, @la)

@sa 6) Who invented the telephone?
= Alexander Graham Bell

Question Number Formatting

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)

Comparison: FlashQuiz vs. CBT Exam

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

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Issues and PRs welcome!

About

A simple markup language to create beautiful quiz and flashcard callouts for Obsidian.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages