A CLI for converting a graded Moodle quiz HTML to a vik.wiki quiz wikitext
Project description
moodle-to-vikwikiquiz
📖 About
A CLI for converting a graded Moodle quiz saved as an HTML file to a vik.viki quiz wikitext.
📋 Features
- Imports multiple HTML files at once
- Can create a new article on vik.wiki with the generated quiz wikitext and summary pre-filled in the editor
- Can open an existing article on vik.wiki with the summary pre-filled in the editor
- Copies the generated wikitext to the clipboard
- Supports single and multiple choice questions
- Deduplicates questions with the same text
- Asks for correct answers if it can't be determined from a graded question
- Adds the only remaining correct answer automatically if it can be determined from the grade
- Formats LaTeX equations as wikitext
- Creates placeholders for illustrations
📥 Installation
- Install Homebrew
- Run the following command in the terminal:
brew install pipx && pipx ensurepath && pipx install moodle-to-vikwikiquiz
🧑💻 Usage
moodle-to-vikwikiquiz [--verbose|-v] [--new|-n] [[--grading|-g] grading_method] source_directory parent_article title
Parameters:
new
: Create a new quiz on vik.wiki by automatically opening an edit page for the new article.grading_method
:+
or-
. See https://vik.wiki/wiki/Segítség:Kvíz#Pontozás for further info.source_directory
: The absolute path of the directory where the Moodle quiz HTML files are located. These HTML files should contain the Review page of the quizzes.parent_article
: The article name of the course on vik.wiki.title
: How the quiz should be named on vik.wiki. This usually is in the following form:[course name] kvíz – [exam name]
. (The hyphen and the part after it can be omitted.) This might be an existing article name if the--new
argument is not provided.
Example:
- Convert all Elektronika alapjai Moodle quizzes downloaded to
~/Downloads/downloaded_ELA_quizzes
:moodle-to-vikwikiquiz --new --grading + ~/Downloads/downloaded_ELA_quizzes "Elektronika alapjai" "Elektronika alapjai kvíz"
Always check the output before uploading it to vik.wiki. Upload all images and add their filenames to the quiz manually on vik.wiki.
⏫ Updating
Run the following command in the terminal:
pipx upgrade-all
If you want this to run automatically, create a cron job:
- Open the
crontab
file:
crontab -e
- Add the following line to the end of the file:
@daily pipx upgrade-all
You may replace @daily
with @weekly
or @monthly
.
📜 License
This project is licensed under the GNU General Public License v3.0. See the license file (or the GPL-3.0 license tab on GitHub) for its full text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for moodle_to_vikwikiquiz-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d3a27ccd4b154064f61a213c72598fbf5a72ca7d740d0729aa5f5c323f3a6d |
|
MD5 | 94eea91f468cf97819189d997ce8ffa8 |
|
BLAKE2b-256 | 2a263ac3a7cd6ab495db4582d377a6ac72ff64b13cebbfea736db7d439a592ea |
Close
Hashes for moodle_to_vikwikiquiz-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce3c74d1c12fcc821ac1720415f55bf93643b4e295ff3756d48b14f1ef9823d2 |
|
MD5 | c5e61b793c85dbf6c3ed79b8c5e28b2e |
|
BLAKE2b-256 | 0ec58ff42bbbcd4cf8ad2a9232abbef926729b9d02d5b137c59527f22d439727 |