Skip to content

Commit

Permalink
fix: recreate docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagi-ovo authored Sep 5, 2024
1 parent 1071d14 commit 6eb87af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def generate_md(course: str, filelist_texts: str, readme_path: str):


if __name__ == '__main__':
if not os.path.isdir('docs'):
os.mkdir('docs')

if os.path.exists('docs'):
shutil.rmtree('docs')
os.mkdir('docs')
courses = list(filter(lambda x: os.path.isdir(x) and (
x not in EXCLUDE_DIRS), os.listdir('.'))) # list courses

Expand All @@ -66,4 +66,4 @@ def generate_md(course: str, filelist_texts: str, readme_path: str):
mainreadme_lines = file.readlines()

with open('docs/index.md', 'w', encoding='utf-8') as file:
file.writelines(mainreadme_lines)
file.writelines(mainreadme_lines)

0 comments on commit 6eb87af

Please sign in to comment.