Skip to content

Commit 2fb8296

Browse files
authored
Use problem-specs description.md or instructions.md (#904)
1 parent e2c8e9b commit 2fb8296

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/lisp_exercise_generator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def create_instructions(exercise_name, prob_spec_exercise):
6868
in the problem-specifications repository.
6969
Precondition: prob_spec_exercise is a string of a valid filepath.
7070
"""
71-
input_file = f"{prob_spec_exercise}/description.md"
71+
description = f"{prob_spec_exercise}/description.md"
72+
instructions = f"{prob_spec_exercise}/instructions.md"
73+
input_file = description if os.path.isfile(description) else instructions
7274
output_file = f"{TARGET}/{exercise_name}/.docs/instructions.md"
7375
with open(input_file, 'r', encoding = "utf-8") as read_from:
7476
with open(output_file, 'w', encoding = "utf-8") as write_to:

0 commit comments

Comments
 (0)