Build a deck by pasting JSON
Create a Flashcards deck, or add cards to one, by pasting a JSON document, a CSV or TSV file, or Markdown.
Cards that already exist somewhere, in a spreadsheet, a document, or an answer from an assistant, can be imported in one step instead of typed one at a time. Import on Flashcards creates a new deck; Import cards under More on a deck's page adds to that deck. Nothing is saved until the preview has been read: the import shows every card it found, with warnings, and any card can be left out.
Use Copy the prompt in the import box to get this format with the instructions an assistant needs. Give it the subject or the material the cards should come from, the level, and how many cards you want, then paste back what it returns.
The whole document is checked before anything is saved. If any part does not fit the format, nothing is saved and the message names the card. Correct the document or give the message to the assistant you used.
Rules for an assistant writing cards
Before writing any cards, ask in one message for each of these that has not been given:
- the subject, or the material the cards should come from;
- the level: beginner, intermediate, advanced, or a named course or exam;
- how many cards to write, suggesting 20; and
- for a language, which way round to study: see the word in that language
and answer in your own, see it in your own language and answer in that
one, or both ways. Ask this in those plain words, not in terms of the
front and back of a card. The side shown first is
front; both ways isreversible: true.
Then write the cards:
- Write exactly the number of cards asked for, up to 2,000. Write fewer only when the material supplied does not have enough distinct ideas to fill them.
- When material is supplied, use only that material. Do not invent facts, dates, names or examples that are not in it.
- When only a subject is given, use well-established facts at the level asked for, and leave out anything uncertain.
- One idea per card. A card that asks two things is two cards.
- Keep questions concise and unambiguous, and answers short. Keep the context a question needs to make sense on its own.
- Do not write two cards that ask the same thing in different words.
- Use only the three card types below, and the fields each one defines.
The document
{
"schema": "magpie-flashcards",
"version": 1,
"deck": {
"title": "Networking basics",
"description": "Core networking concepts from chapter 4.",
"tags": ["networking"],
"source": "Networking Fundamentals, chapter 4"
},
"cards": [
{
"type": "basic",
"front": "What does DNS stand for?",
"back": "Domain Name System",
"tags": ["dns"]
},
{
"type": "basic",
"front": "Bonjour",
"back": "Hello",
"reversible": true
},
{
"type": "cloze",
"text": "HTTPS normally uses port {{443}}."
},
{
"type": "multiple_choice",
"question": "Which port normally uses HTTPS?",
"choices": ["22", "53", "80", "443"],
"answer": "443"
}
]
}
| Field | Type | Notes |
|---|---|---|
schema |
string, optional | Always magpie-flashcards when present. |
version |
number, optional | Always 1 when present. |
deck |
object | Required when creating a deck; ignored when adding to one. |
cards |
array, required | At least one card, up to 2,000. |
The deck has title (required, up to 255 characters), and optional
description (up to 5,000 characters), tags (a list of up to 10 short
words) and source (up to 500 characters, where the cards came from).
Cards
Every card has type: basic, cloze or multiple_choice. Each type uses
its own fields and no others.
type |
Fields |
|---|---|
basic |
front and back, both required. reversible (true or false, optional) also asks the card back to front. |
cloze |
text, required: the sentence with each hidden part inside double braces, such as {{answer}}. At least one hidden part; none empty. |
multiple_choice |
question, choices (a list of 2 to 8 distinct texts) and answer, which must be one of the choices, all required. |
Any card may also have:
typed(true or false): study asks for the answer to be typed and checks it before showing the answer side.tags: a list of up to 10 short words.sourceId: text up to 120 characters identifying the card in the source material, such aschapter4-question-12. It is kept with the card and exported again; it is never used as the card's identity in Magpie.imageUuid: the identifier of an image in your own image library, shown above the question. An image that is not in your library is left off.
Text is Markdown: **bold**, lists, links and fenced code blocks work. Each
side is up to 5,000 characters. A document is
up to 2 MB.
CSV and TSV
A CSV or TSV file is read as one card per row. The first row may name the
columns: front, back, type, choices (separated by |), tags,
reversible, typed and sourceId, in any order. Without a header row the
columns are front, back and tags. A row with an empty back whose front
contains {{ is read as a fill-in-the-blank card.
front,back,tags
What does DNS stand for?,Domain Name System,dns
HTTPS normally uses port {{443}}.,,
Markdown and plain text
In Markdown or plain text, a card is:
- one line written as
front :: back; - a line of text with
{{hidden parts}}, read as fill in the blank; - a paragraph whose first line is the front and whose remaining lines are the back, with a blank line before the next card; or
- a question followed by a list of choices, with the correct one marked
- [x].
A first-level heading (# French vocabulary) names the deck. Other headings
are ignored.
# French vocabulary
Bonjour :: Hello
Merci :: Thank you
Which port normally uses HTTPS?
- 22
- [x] 443
- 80
The preview
The preview counts the cards by type and lists warnings: a card whose front matches another card's, or one already in the deck, is marked as a possible duplicate, and a card with a very long side or more than one question is marked as possibly hard to study. Warnings never block an import. Untick a card to leave it out, or untick Include all to start from none and tick the ones you want; the line under Cards says how many will be imported. Then choose Import deck or Add cards.
If an import is rejected for a reason you cannot work out, Contact support.