File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,13 +84,18 @@ def process_one_file(file_name: str) -> None:
8484 log .info (f"[VRDU] file: { file_name } , paper has been processed" )
8585 return
8686
87+ # make a copy of the original tex file
88+ original_tex = os .path .join (main_directory , "paper_original.tex" )
89+ shutil .copyfile (file_name , original_tex )
90+
91+ # remove the output folder if it exists
8792 output_directory = os .path .join (main_directory , "output" )
8893 if os .path .exists (output_directory ):
8994 shutil .rmtree (output_directory )
9095
91- # make a copy of the original tex file
92- original_tex = os . path . join ( main_directory , "paper_original.tex" )
93- shutil . copyfile ( file_name , original_tex )
96+ # output_directory stores the intermediate results
97+ # result_directory stores the final results
98+ os . makedirs ( os . path . join ( main_directory , "output/result" ) )
9499
95100 cwd = os .getcwd ()
96101
Original file line number Diff line number Diff line change 1111log = logger .get_logger (__name__ )
1212
1313
14-
1514def remove_comments (original_tex : str ) -> None :
1615 """
1716 Removes comments from a TeX file.
@@ -187,7 +186,3 @@ def run(original_tex: str) -> None:
187186
188187 # Step 3: delete table of contents
189188 delete_table_of_contents (original_tex )
190-
191- # create output folder
192- main_directory = os .path .dirname (original_tex )
193- os .makedirs (os .path .join (main_directory , "output/result" ))
You can’t perform that action at this time.
0 commit comments