Home
LEARN FAST AND FORGET ABOUT FORGETTING!

What should be the Q&A file format?

The file should be a text file with the course definition in the Q&A format used by SuperMemo: Data formats and exchange. The file extension does not have to be .txt, although this format is recommended. The file should be saved by using the UTF-8 encoding.

In short: Let’s see an example:

File: Capitals.txt

--- File contents ---

Q: What city is the capital of Poland?
A: Warszawa

Q: What city is the capital of Germany?
A: Berlin

--- End of file ---

The Q&A format defines three tags: "Q:", "A:" and empty line tag (empty line between exercises). The "Q:" tag defines the question beginning. The "A:" tag defines the answer beginning. The empty line defines the end of the exercise definition (i.e. exercises are separated with empty lines).

The end of a given tag is defined by the line end tag.