Closed vvscode closed 6 years ago
Vasiliy, I completely agree with you.
@zenby from another point of view - if we're going use yaml
as a tool for cards description - we could use similar in simple language and have yaml-schema validations. That might save a lot of time on debugging for cases when we don't realize why some card hasn't been compiled
Comparation for json
/yaml
/ js
:
{
"type": "choose_options",
"card": {
"question": "What is javascript framework?",
"answers": [
{
"text": "Angular",
"correct": true
},
{
"text": "Zend",
"correct": false
},
{
"text": "Пингвин",
"correct": false
}
],
"tags": [
"js",
"frontend"
]
}
}
type: choose_options
card:
question: What is javascript framework?
answers:
- text: Angular
correct: true
- text: Zend
correct: false
- text: Пингвин
correct: false
tags:
- js
- frontend
module.exports = {
type: "choose_options",
card: {
question: "What is javascript framework?",
answers: [
{
text: "Angular",
correct: true
},
{
text: "Zend",
correct: false
},
{
text: "Пингвин",
correct: false
}
],
tags: ["js", "frontend"]
}
};
I think working with JSON will be more convenient, because YAML format is harder to read and as I understand it, we will need to install a separate library to work with it
Current format is JSON5 - https://json5.org/
Example: https://github.com/memory-cards/cards/blob/master/general-development/s-solid-en.json5
I propose to use markdown as the default cards format. For me - common fields for any cards should be -
title
,description
,topics
,tags
and after that custombody
depends on card format.Title
/description
just for info. They might not be used on rendering card, but they might be useful for comments.So it might be like next ( https://github.com/remarkjs/remark-frontmatter ):
and custom
body
below ( depends on card type )