From 9a5ef329297e80171c3717ec6af1d9956db942c7 Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Sat, 15 Jan 2022 16:53:25 +0200 Subject: [PATCH] ref(devtools): eliminate the need for the duplicate course_dir parameter --- apps/tools/librelingo_tools/generate.py | 6 +----- config/courses.json | 12 ++++-------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/apps/tools/librelingo_tools/generate.py b/apps/tools/librelingo_tools/generate.py index c9e97aa27e18..a2877392be1e 100755 --- a/apps/tools/librelingo_tools/generate.py +++ b/apps/tools/librelingo_tools/generate.py @@ -112,10 +112,6 @@ def main(): if "reldir" in course: reldir = course["reldir"] - course_dir = os.path.join(sdir, "course") - if "course_dir" in course: - course_dir = os.path.join(root, course["course_dir"]) - generate_course( links=links, courses_data=courses_data, @@ -123,7 +119,7 @@ def main(): reldir=reldir, outdir=outdir, tdir=course["tdir"], - course_dir=course_dir, + course_dir=os.path.join(sdir, reldir), ) end_time = datetime.datetime.now() diff --git a/config/courses.json b/config/courses.json index 437b096638a6..092cad68aa12 100644 --- a/config/courses.json +++ b/config/courses.json @@ -26,22 +26,18 @@ }, { "tdir": "basque-from-english", - "reldir": "courses/basque-from-english", - "course_dir": "courses/basque-from-english" + "reldir": "courses/basque-from-english" }, { "tdir": "bangla-from-english", - "reldir": "temporarily_inactive_courses/bangla-from-english", - "course_dir": "temporarily_inactive_courses/bangla-from-english" + "reldir": "temporarily_inactive_courses/bangla-from-english" }, { "tdir": "french-from-english", - "reldir": "temporarily_inactive_courses/french-from-english", - "course_dir": "temporarily_inactive_courses/french-from-english" + "reldir": "temporarily_inactive_courses/french-from-english" }, { "tdir": "parsig-from-english", - "reldir": "temporarily_inactive_courses/parsig-from-english", - "course_dir": "temporarily_inactive_courses/parsig-from-english" + "reldir": "temporarily_inactive_courses/parsig-from-english" } ]