upgrade structures and migrate to nextra v4
This commit is contained in:
19
toolboxes/LNG_v1.0.py
Normal file
19
toolboxes/LNG_v1.0.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
|
||||
course_code=input('We will follow the naming pattern of {class}_L{lecture number}.md, enter the course code to start.\n')
|
||||
start=input('enter the number of lecture that you are going to start.\n')
|
||||
end=input('Enter the end of lecture (exclusive).\n')
|
||||
start=int(start)
|
||||
end=int(end)
|
||||
|
||||
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
while start<end:
|
||||
# create a empty text file
|
||||
file_name = os.path.join(cur_dir, f'{course_code}_L{start}.md')
|
||||
fp = open(file_name, 'w')
|
||||
fp.write(f'# Lecture {start}')
|
||||
fp.close()
|
||||
start+=1
|
||||
|
||||
print("Complete")
|
||||
Reference in New Issue
Block a user