Skip to content

Commit 4f81dd8

Browse files
committed
refactor(main.py, preprocess.py): move mkdir to main.py for clarity
1 parent 4c94d9e commit 4f81dd8

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def process_one_file(file_name: str) -> None:
108108
try:
109109
# change the working directory to the main directory of the paper
110110
os.chdir(main_directory)
111+
# create output folder
112+
os.makedirs(os.path.join(main_directory, "output/result"))
111113

112114
# step 1: preprocess the paper
113115
preprocess.run(original_tex)

vrdu/preprocess.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,3 @@ def run(original_tex: str) -> None:
188188

189189
# Step 3: delete table of contents
190190
delete_table_of_contents(original_tex)
191-
192-
# create output folder
193-
main_directory = os.path.dirname(original_tex)
194-
os.makedirs(os.path.join(main_directory, "output/result"))

0 commit comments

Comments
 (0)