Skip to content

MattheDev53/open-quiz-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Quiz Format

The Open Quiz Format (OQF) is a markup language for creating multiple choice quizzes. It attempts to be as simple to use as possible for anyone to use.

Format

A .oqf file can be made in any text editor and has an extremely simple format. Questions and answers are formatted with the following syntax:

:Question
!Incorrect answers are marked with a ! and not a =
=Correct answers are marked with a = and not a !
=Multiple correct answers can be selected at the same time
!Questions can have as many questions as you want
=Questions end with a semi colon character;

More advanced syntax can be observed in test.oqf

FAQ

Where can I use this?

You can (officially) use this in Typst and in Go (docs) as of now. I'll write a Rust and Python port soon.

I want to use this in my project!

Awesome! If there's a library for your preferred language, great! If not, either wait for someone to make one, or make it yourself! Take a look at oqf.go or lib.typ (the original reference implementation) for a reference implementation.

Why was the original reference implementation written with Typst?

I came up with this idea in school, so I had no access to compilers when coming up with the idea. I did, however, have access to Typst.

What programs support opening .oqf files

Any program that can edit data (Notepad, VSCode, Neovim, etc)

What inspired this?

I was looking into how Kahoot handles importing questions. It turns out, they have you use a template .xlsx to format everything properly. Upon first glance, this doesn't seem too bad, but if you look into what a .xlsx file is, you start to realize there's a ton of unnecesary data being transferred. It just seemed like an unoptimal way of doing things. So I decided to look into creating my own format for making quizzes. Next thing you know I've got something of an Open Quiz Format on my hands.

Why does something like this need to exist?

Well, it doesn't need to exist. Kahoot has a way to import a list of questions and associated answers. However, as stated in the previous FAQ, it is VERY inefficient.

Okay, but how does it actually compare to Kahoot's method?

Kahoot's sample spreadsheet (which kindly enough contains a starter question) takes up 27.2 kB according to nushell's ls. This same exact quiz rewritten with OQF (available at kahoot.oqf) takes up 118 B according to nushell's ls. That's almost a 225x size reduction. This makes a lot of sense when you consider the fact that a spreadsheet also has to carry info about styling, images, grouped cells, and probably more that I'm missing.

TODO

  • Add a comment field (Could be used for multiple things)
  • Add a time limit field (for compatibility with Kahoot)
  • Add a points field (for compatibility with Google Forms)
  • Add a signifier for optional questions (for compatibility with Google Forms)
  • Write a parser in Go
  • Remove Header
  • Write a parser in Rust
  • Write a parser in Python

About

A hassle free file format for creating multiple choice quizzes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors