From 9a82aebc0115eeb1ef7fc6aecccb991c84b56b9c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 4 Nov 2023 13:08:08 +0100 Subject: add answer flag to specify used prompt --- quiz.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'quiz.py') diff --git a/quiz.py b/quiz.py index c658508..f01ec10 100755 --- a/quiz.py +++ b/quiz.py @@ -200,6 +200,9 @@ def main(): parser.add_argument('--question-match', help='match question files names', default='*') + parser.add_argument('--answers', + help='match question files names', + nargs='*') args = parser.parse_args() question_dirs = [Path(p) for p in args.question_dir or ['.']] @@ -220,7 +223,7 @@ def main(): print(f'{next_question}: {solution}', end='') show_question(next_question) - prompt_solution(solution) + prompt_solution(solution, prompts=args.answers) terminate_subprocesses() solved.append(next_question) -- cgit v1.2.3