{"id":21007003,"url":"https://github.com/jjfiv/quizdown","last_synced_at":"2025-05-15T02:31:02.533Z","repository":{"id":39580238,"uuid":"266563152","full_name":"jjfiv/quizdown","owner":"jjfiv","description":"Quickly create and export quiz questions from a markdown subset.","archived":false,"fork":false,"pushed_at":"2023-11-12T22:35:22.000Z","size":87,"stargazers_count":16,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T23:51:43.350Z","etag":null,"topics":["education","markdown","moodle","multiple-choice"],"latest_commit_sha":null,"homepage":"https://static.jjfoley.me/quizdown-web/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjfiv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-24T14:54:36.000Z","updated_at":"2024-04-14T11:24:25.000Z","dependencies_parsed_at":"2022-09-16T13:35:15.544Z","dependency_job_id":null,"html_url":"https://github.com/jjfiv/quizdown","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjfiv%2Fquizdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjfiv%2Fquizdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjfiv%2Fquizdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjfiv%2Fquizdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjfiv","download_url":"https://codeload.github.com/jjfiv/quizdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225073065,"owners_count":17416536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["education","markdown","moodle","multiple-choice"],"created_at":"2024-11-19T08:54:27.788Z","updated_at":"2024-11-19T08:54:28.493Z","avatar_url":"https://github.com/jjfiv.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quizdown [![PyPI version](https://badge.fury.io/py/quizdown.svg)](https://pypi.org/project/quizdown) ![Rust](https://github.com/jjfiv/quizdown/workflows/Rust/badge.svg)\n\nMarkdown, but for creating multiple-choice quizzes. Especially helpful if you routinely want syntax-highlighting in your question, answers, or distractors.\n\nTry a [live version (beta)](https://static.jjfoley.me/quizdown-web/) on my website.\n\n## Off-line Quick-Start\n\n### Install (from PyPI)\n\nMaybe in a virtualenv? This may need to be ``pip3``.\n\n```bash\npip install quizdown\n```\n\n### Preview a Markdown file in the browser.\n\n```bash\npython -m quizdown 01_syllabus.md --output 01_syllabus.html --browser\n```\n\n### Export to Moodle:\n\n```bash\n# Use the .moodle extension\npython -m quizdown 01_syllabus.md --output 01_syllabus.moodle\n# If you'd rather .xml:\npython -m quizdown 01_syllabus.md --format=moodle --output 01_syllabus.xml\n```\n\n### More options:\n\n```\npython -m quizdown --help\nusage: quizdown MARKDOWN_FILE --output (out.moodle|preview.html)\n\npositional arguments:\n  INPUT_FILE            Markdown file containing quiz questions.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --output OUTPUT_FILE  Where to save the processed output: a .moodle or .html\n                        extension.\n  --format {HtmlSnippet,HtmlFull,MoodleXml}\n                        Output format, if we cannot figure out from file\n                        extension.\n  --name QUIZ_NAME      This is the name of the quiz or question category upon\n                        import. INPUT_FILE if not defined.\n  --theme SYNTAX_THEME  Syntax highlighting-theme; default=InspiredGitHub\n                        {'Solarized (dark)', 'base16-ocean.light',\n                        'base16-ocean.dark', 'base16-eighties.dark',\n                        'Solarized (light)', 'InspiredGitHub',\n                        'base16-mocha.dark'} available.\n  --lang LANG           Language string to assume for syntax-highlighting of\n                        un-marked code blocks; default='text'; try 'python' or\n                        'java'.\n  --browser             Directly open a preview in the default web-browser.\n```\n\n## What is ``quizdown``?\n\nThis is a tool for quickly specifying 5-20 multiple choice questions in a markdown subset. Right now you can export to both MoodleXML and HTML. \n\n## Why would I use this over Moodle's built-in editor?\n\n- Less clicks! Make as many questions as you want with just your keyboard. Then import them in bulk to a \"Question Bank\" and then from there to a new \"Quiz\".\n- You teach CS/Data Science/STEM and you want or NEED some ***good*** syntax highlighting for your class.\n- Sane defaults: all questions are \"select as many as apply\", with no partial credit.\n\n## Limitations\n\n - ONLY Multiple choice questions are supported.\n - Any partial credit must be done post-export via Moodle.\n - No way to upload images. You could theoretically embed SVG and base64 images but I haven't looked into it.\n - Error messages are limited (I just figured out how to get position information from the markdown library; need to sprinkle it through). For now, treat it like LaTeX: binary search for your errors ;p\n\n## Roadmap\n\n - Other question types, e.g., Essay questions? #1\n - Better error messages. (No line/col or question # information right now) #2\n - QTI/Blackboard export support. #3\n - File an issue: https://github.com/jjfiv/quizdown/issues\n\n\n## How to write a bunch of questions (in words):\n\n - Use headings (whatever level you want; be consistent) to separate questions.\n - Questions end with a github-style task list -- if you want moodle to shuffle, use unordered lists, otherwise make them ordered.\n - Tasks marked as \"complete\" are correct answers.\n - We're building on [pulldown_cmark](https://github.com/raphlinus/pulldown-cmark); a CommonMark-compatible markdown implementation with the \"github tables\" \"github task lists\" and \"strikethrough\" extensions.\n\n## Example\n\n### Source Question\n\nLet's imagine we're teaching Python and want to make sure students (A) understand list-append, and (B) remember that lists should never be used as default arguments.\n\n    ### A. Python Lists\n    \n    ```python\n    xs = [1,2,3]\n    xs.append(7)\n    print(sum(xs))\n    ```\n    \n    What gets printed?\n    \n    1. [ ] It's impossible to know.\n    1. [x] 13\n    1. [ ] Something else.\n\n\n    ### B. Python Lists and Default Arguments\n\n    ```python\n    def take_default_list(xs = []):\n        xs.append(7)\n        return sum(xs)\n    ```\n\n    What is the output of ``take_default_list([1,2,3])``?\n\n    1. [x] It's impossible to know.\n    1. [ ] 13\n    1. [ ] Something else.\n\n## Example (rendered)\n\nI have a private github repo for each class, with files labeled by lecture number and topic, e.g., ``05_Lists.md`` -- Any old Markdown renderer is close enough for 99% of questions.\n\nHere's someone's README.md rendering of the above example questions.\n\n### A. Python Lists\n\n```python\nxs = [1,2,3]\nxs.append(7)\nprint(sum(xs))\n```\n\nWhat gets printed?\n\n1. [ ] It's impossible to know.\n1. [x] 13\n1. [ ] Something else.\n\n\n### B. Python Lists and Default Arguments\n\n```python\ndef take_default_list(xs = []):\n    xs.append(7)\n    return sum(xs)\n```\n\nWhat is the output of ``take_default_list([1,2,3])``?\n\n1. [x] It's impossible to know.\n1. [ ] 13\n1. [ ] Something else.\n\n### Why'd you write this in Rust?\n\nBecause my first version (in Python w/BeautifulSoup) was a bit of a disaster, maintenance-wise. Also, I wanted to have the ability to host an editor online. So this one compiles to WASM.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjfiv%2Fquizdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjfiv%2Fquizdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjfiv%2Fquizdown/lists"}