从git存储库中的提交生成kahoot测试
git-kahoot的Python项目详细描述
Git Kahoot
从git存储库中的提交生成kahoot测试。
安装
需要Python3。
pip install git-kahoot
用法
Usage: git-kahoot [OPTIONS]
Generate a Kahoot quiz from commits in a git repository.
Options:
-d, --directory DIRECTORY path to git repository (default: current
directory) Specify this option multiple
times to use multiple repositories.
--since [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
only include commits since this date
--until [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
only include commits up until this date
-n, --count INTEGER RANGE number of questions (default: 20, max: 100)
-u, --username TEXT Kahoot user name [required]
-p, --password TEXT Kahoot password [required]
-t, --title TEXT title of the generated quiz (default: "Git
Commiter Quiz"
--help Show this message and exit.
示例
使用-d选项指定git存储库的路径。忽略此选项将尝试使用当前目录。
git-kahoot --directory /my/repo
可以指定多个git存储库。提交将以循环方式进行选择。
git-kahoot --directory /my/repo --directory /my/second-repo
仅包括日期范围之间的提交。
git-kahoot --directory /my/repo --since 2015-01-01 --until 2018-01-01
设置生成的测验的标题和问题数。
git-kahoot --title "My glorious quiz" --count 10
指定kahoot帐户的凭据。如果忽略这些凭据,系统将提示您输入它们。
git-kahoot --username AzureDiamond --password hunter2
开发设置
假设安装了python 3、pip和virtualenv,克隆存储库,设置virtualenv并将包安装为可编辑的。
git clone git@github.com:janerist/git-kahoot.git
cd git-kahoot
virtualenv -p python3 venv
. venv/bin/activate (Windows: venv/Scripts/activate)
pip install --editable .
git-kahoot