Skip to content

Commit

Permalink
ref(devtools): eliminate the need for the duplicate course_dir parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Jan 15, 2022
1 parent 75d9424 commit 9a5ef32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
6 changes: 1 addition & 5 deletions apps/tools/librelingo_tools/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,14 @@ 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,
sdir=sdir,
reldir=reldir,
outdir=outdir,
tdir=course["tdir"],
course_dir=course_dir,
course_dir=os.path.join(sdir, reldir),
)

end_time = datetime.datetime.now()
Expand Down
12 changes: 4 additions & 8 deletions config/courses.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]

1 comment on commit 9a5ef32

@vercel
Copy link

@vercel vercel bot commented on 9a5ef32 Jan 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.