Name | my-quiz-plugin JSON |
Version |
2.0.1
JSON |
| download |
home_page | None |
Summary | A MkDocs plugin to create quiz |
upload_time | 2024-09-11 15:59:57 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT |
keywords |
mkdocs
plugin
quiz
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Mkdocs Quizz
## Installation
```
pip install my_quiz_plugin
```
### Add extra js/css
Go to your `docs/` folder and create :
- `javascripts/extra.js` file here :
- `stylesheets/extra.css` file here :
Then add to `mkdocs.yml` file this lines :
```yaml
plugins:
- search
- my_quiz_plugin:
quiz_file: quizzes.json
language: en
show_refresh_button: true
show_indice_on_answer: true
show_score: true
show_progress_bar: true
extra_css:
- stylesheets/extra.css
- https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css
extra_javascript:
- javascripts/extra.js
```
### Create a `quizzes.json` file
Ensure your `quizzes` JSON file is structured like this :
```json
{
"quizzes": {
"quiz1": {
"questions": [
{
"type": "multiple-choice",
"question": {
"en": "What is the capital of France?",
"fr": "Quelle est la capitale de la France?"
},
"options": [
{
"text": {
"en": "Berlin",
"fr": "Berlin"
},
"correct": false,
"indice": {
"en": "This is the capital of Germany.",
"fr": "Ceci est la capitale de l'Allemagne."
}
},
{
"text": {
"en": "Madrid",
"fr": "Madrid"
},
"correct": false,
"indice": {
"en": "This is the capital of Spain.",
"fr": "Ceci est la capitale de l'Espagne."
}
},
{
"text": {
"en": "Paris",
"fr": "Paris"
},
"correct": true,
"indice": {
"en": "Paris is the city of light",
"fr": ""
}
},
{
"text": {
"en": "Rome",
"fr": "Rome"
},
"correct": false,
"indice": {
"en": "This is the capital of Italy.",
"fr": "Ceci est la capitale de l'Italie."
}
}
]
},
{
"type": "true-false",
"question": {
"en": "The Earth is flat.",
"fr": "La Terre est plate."
},
"options": [
{
"text": {
"en": "True",
"fr": "Vrai"
},
"correct": false,
"indice": {
"en": "The Earth is round.",
"fr": "La Terre est ronde."
}
},
{
"text": {
"en": "False",
"fr": "Faux"
},
"correct": true,
"indice": {
"en": "",
"fr": ""
}
}
]
},
{
"type": "fill-in-the-blank",
"question": {
"en": "____ is the largest planet in our solar system.",
"fr": "____ est la plus grande planète de notre système solaire."
},
"answer": {
"en": "Jupiter",
"fr": "Jupiter"
},
"indice": {
"en": "It is a gas giant.",
"fr": "C'est une géante gazeuse."
}
},
{
"type": "multi-choice",
"question": {
"en": "Select the primary colors:",
"fr": "Sélectionnez les couleurs primaires :"
},
"options": [
{
"text": {
"en": "Red",
"fr": "Rouge"
},
"correct": true,
"indice": {
"en": "Red is a primary color.",
"fr": "Rouge est une couleur primaire."
}
},
{
"text": {
"en": "Blue",
"fr": "Bleu"
},
"correct": true,
"indice": {
"en": "Blue is a primary color.",
"fr": "Bleu est une couleur primaire."
}
},
{
"text": {
"en": "Green",
"fr": "Vert"
},
"correct": false,
"indice": {
"en": "Green is a secondary color.",
"fr": "Vert est une couleur secondaire."
}
},
{
"text": {
"en": "Yellow",
"fr": "Jaune"
},
"correct": true,
"indice": {
"en": "Yellow is a primary color.",
"fr": "Jaune est une couleur primaire."
}
}
]
}
]
},
"quiz2": {
"questions": [
{
"type": "multiple-choice",
"question": {
"en": "Which element has the chemical symbol 'O'?",
"fr": "Quel élément a le symbole chimique 'O'?"
},
"options": [
{
"text": {
"en": "Oxygen",
"fr": "Oxygène"
},
"correct": true,
"indice": {
"en": "",
"fr": ""
}
},
{
"text": {
"en": "Gold",
"fr": "Or"
},
"correct": false,
"indice": {
"en": "The symbol for gold is 'Au'.",
"fr": "Le symbole de l'or est 'Au'."
}
},
{
"text": {
"en": "Osmium",
"fr": "Osmium"
},
"correct": false,
"indice": {
"en": "The symbol for osmium is 'Os'.",
"fr": "Le symbole de l'osmium est 'Os'."
}
},
{
"text": {
"en": "Hydrogen",
"fr": "Hydrogène"
},
"correct": false,
"indice": {
"en": "The symbol for hydrogen is 'H'.",
"fr": "Le symbole de l'hydrogène est 'H'."
}
}
]
},
{
"type": "true-false",
"question": {
"en": "Water boils at 100°C.",
"fr": "L'eau bout à 100°C."
},
"options": [
{
"text": {
"en": "True",
"fr": "Vrai"
},
"correct": true,
"indice": {
"en": "",
"fr": ""
}
},
{
"text": {
"en": "False",
"fr": "Faux"
},
"correct": false,
"indice": {
"en": "At sea level, water boils at 100°C.",
"fr": "Au niveau de la mer, l'eau bout à 100°C."
}
}
]
},
{
"type": "fill-in-the-blank",
"question": {
"en": "The chemical formula for water is ___.",
"fr": "La formule chimique de l'eau est ___."
},
"answer": {
"en": "H2O",
"fr": "H2O"
},
"indice": {
"en": "It consists of two hydrogen atoms and one oxygen atom.",
"fr": "Elle se compose de deux atomes d'hydrogène et d'un atome d'oxygène."
}
}
]
}
}
}
```
### Run the mkdocs server
```
mkdocs serve
```
Raw data
{
"_id": null,
"home_page": null,
"name": "my-quiz-plugin",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "mkdocs plugin quiz",
"author": null,
"author_email": "benjamin@proton.me",
"download_url": "https://files.pythonhosted.org/packages/a7/38/b0a2be64da5f3f771ecaa2cbe2536eac3325d9cf754fcca15ad9d6a37a92/my_quiz_plugin-2.0.1.tar.gz",
"platform": null,
"description": "# Mkdocs Quizz \n\n## Installation \n\n```\npip install my_quiz_plugin\n```\n\n### Add extra js/css\n\nGo to your `docs/` folder and create : \n\n- `javascripts/extra.js` file here : \n- `stylesheets/extra.css` file here : \n\nThen add to `mkdocs.yml` file this lines : \n\n```yaml\nplugins:\n - search\n - my_quiz_plugin:\n quiz_file: quizzes.json\n language: en\n show_refresh_button: true\n show_indice_on_answer: true\n show_score: true\n show_progress_bar: true\n\nextra_css:\n - stylesheets/extra.css\n - https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css\n\nextra_javascript:\n - javascripts/extra.js\n```\n\n### Create a `quizzes.json` file \n\nEnsure your `quizzes` JSON file is structured like this :\n\n```json\n{\n \"quizzes\": {\n \"quiz1\": {\n \"questions\": [\n {\n \"type\": \"multiple-choice\",\n \"question\": {\n \"en\": \"What is the capital of France?\",\n \"fr\": \"Quelle est la capitale de la France?\"\n },\n \"options\": [\n {\n \"text\": {\n \"en\": \"Berlin\",\n \"fr\": \"Berlin\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"This is the capital of Germany.\",\n \"fr\": \"Ceci est la capitale de l'Allemagne.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Madrid\",\n \"fr\": \"Madrid\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"This is the capital of Spain.\",\n \"fr\": \"Ceci est la capitale de l'Espagne.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Paris\",\n \"fr\": \"Paris\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"Paris is the city of light\",\n \"fr\": \"\"\n }\n },\n {\n \"text\": {\n \"en\": \"Rome\",\n \"fr\": \"Rome\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"This is the capital of Italy.\",\n \"fr\": \"Ceci est la capitale de l'Italie.\"\n }\n }\n ]\n },\n {\n \"type\": \"true-false\",\n \"question\": {\n \"en\": \"The Earth is flat.\",\n \"fr\": \"La Terre est plate.\"\n },\n \"options\": [\n {\n \"text\": {\n \"en\": \"True\",\n \"fr\": \"Vrai\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"The Earth is round.\",\n \"fr\": \"La Terre est ronde.\"\n }\n },\n {\n \"text\": {\n \"en\": \"False\",\n \"fr\": \"Faux\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"\",\n \"fr\": \"\"\n }\n }\n ]\n },\n {\n \"type\": \"fill-in-the-blank\",\n \"question\": {\n \"en\": \"____ is the largest planet in our solar system.\",\n \"fr\": \"____ est la plus grande plan\u00e8te de notre syst\u00e8me solaire.\"\n },\n \"answer\": {\n \"en\": \"Jupiter\",\n \"fr\": \"Jupiter\"\n },\n \"indice\": {\n \"en\": \"It is a gas giant.\",\n \"fr\": \"C'est une g\u00e9ante gazeuse.\"\n }\n },\n {\n \"type\": \"multi-choice\",\n \"question\": {\n \"en\": \"Select the primary colors:\",\n \"fr\": \"S\u00e9lectionnez les couleurs primaires :\"\n },\n \"options\": [\n {\n \"text\": {\n \"en\": \"Red\",\n \"fr\": \"Rouge\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"Red is a primary color.\",\n \"fr\": \"Rouge est une couleur primaire.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Blue\",\n \"fr\": \"Bleu\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"Blue is a primary color.\",\n \"fr\": \"Bleu est une couleur primaire.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Green\",\n \"fr\": \"Vert\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"Green is a secondary color.\",\n \"fr\": \"Vert est une couleur secondaire.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Yellow\",\n \"fr\": \"Jaune\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"Yellow is a primary color.\",\n \"fr\": \"Jaune est une couleur primaire.\"\n }\n }\n ]\n }\n ]\n },\n \"quiz2\": {\n \"questions\": [\n {\n \"type\": \"multiple-choice\",\n \"question\": {\n \"en\": \"Which element has the chemical symbol 'O'?\",\n \"fr\": \"Quel \u00e9l\u00e9ment a le symbole chimique 'O'?\"\n },\n \"options\": [\n {\n \"text\": {\n \"en\": \"Oxygen\",\n \"fr\": \"Oxyg\u00e8ne\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"\",\n \"fr\": \"\"\n }\n },\n {\n \"text\": {\n \"en\": \"Gold\",\n \"fr\": \"Or\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"The symbol for gold is 'Au'.\",\n \"fr\": \"Le symbole de l'or est 'Au'.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Osmium\",\n \"fr\": \"Osmium\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"The symbol for osmium is 'Os'.\",\n \"fr\": \"Le symbole de l'osmium est 'Os'.\"\n }\n },\n {\n \"text\": {\n \"en\": \"Hydrogen\",\n \"fr\": \"Hydrog\u00e8ne\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"The symbol for hydrogen is 'H'.\",\n \"fr\": \"Le symbole de l'hydrog\u00e8ne est 'H'.\"\n }\n }\n ]\n },\n {\n \"type\": \"true-false\",\n \"question\": {\n \"en\": \"Water boils at 100\u00b0C.\",\n \"fr\": \"L'eau bout \u00e0 100\u00b0C.\"\n },\n \"options\": [\n {\n \"text\": {\n \"en\": \"True\",\n \"fr\": \"Vrai\"\n },\n \"correct\": true,\n \"indice\": {\n \"en\": \"\",\n \"fr\": \"\"\n }\n },\n {\n \"text\": {\n \"en\": \"False\",\n \"fr\": \"Faux\"\n },\n \"correct\": false,\n \"indice\": {\n \"en\": \"At sea level, water boils at 100\u00b0C.\",\n \"fr\": \"Au niveau de la mer, l'eau bout \u00e0 100\u00b0C.\"\n }\n }\n ]\n },\n {\n \"type\": \"fill-in-the-blank\",\n \"question\": {\n \"en\": \"The chemical formula for water is ___.\",\n \"fr\": \"La formule chimique de l'eau est ___.\"\n },\n \"answer\": {\n \"en\": \"H2O\",\n \"fr\": \"H2O\"\n },\n \"indice\": {\n \"en\": \"It consists of two hydrogen atoms and one oxygen atom.\",\n \"fr\": \"Elle se compose de deux atomes d'hydrog\u00e8ne et d'un atome d'oxyg\u00e8ne.\"\n }\n }\n ]\n }\n }\n}\n```\n\n### Run the mkdocs server \n\n```\nmkdocs serve\n``` \n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A MkDocs plugin to create quiz",
"version": "2.0.1",
"project_urls": {
"Bug Reports": "https://github.com/bdllard/my_quiz_plugin/issues",
"Source": "https://github.com/bdallard/my_quiz_plugin"
},
"split_keywords": [
"mkdocs",
"plugin",
"quiz"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97351e4b7c54d22cc01a0ffced4eda012b478146be3879928232d9613ff9bb8b",
"md5": "490a650db5d49251c4ae339c0501c104",
"sha256": "c71cabba6e18d4ef3c2317e819dc70a13f78bcba38311302a792ab3aff06ebae"
},
"downloads": -1,
"filename": "my_quiz_plugin-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "490a650db5d49251c4ae339c0501c104",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15440,
"upload_time": "2024-09-11T15:59:56",
"upload_time_iso_8601": "2024-09-11T15:59:56.492518Z",
"url": "https://files.pythonhosted.org/packages/97/35/1e4b7c54d22cc01a0ffced4eda012b478146be3879928232d9613ff9bb8b/my_quiz_plugin-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a738b0a2be64da5f3f771ecaa2cbe2536eac3325d9cf754fcca15ad9d6a37a92",
"md5": "5f1db8652d1ba00b940cc6d5cf7fc46c",
"sha256": "929065121eaa5e13b535a8b77eff2419e9f1972b293020428c62b02e9a3721fb"
},
"downloads": -1,
"filename": "my_quiz_plugin-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5f1db8652d1ba00b940cc6d5cf7fc46c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16095,
"upload_time": "2024-09-11T15:59:57",
"upload_time_iso_8601": "2024-09-11T15:59:57.854763Z",
"url": "https://files.pythonhosted.org/packages/a7/38/b0a2be64da5f3f771ecaa2cbe2536eac3325d9cf754fcca15ad9d6a37a92/my_quiz_plugin-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-11 15:59:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bdllard",
"github_project": "my_quiz_plugin",
"github_not_found": true,
"lcname": "my-quiz-plugin"
}