File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,30 +132,6 @@ def process_one_file(file_name) -> None:
132132 os .chdir (cwd )
133133
134134
135- def parse_arguments () -> str :
136- """
137- Parses the command line arguments and returns the name of the tex file.
138-
139- Returns:
140- str: The name of the tex file with full path.
141-
142- Raises:
143- argparse.ArgumentError: If the required file name argument is not provided.
144- """
145- parser = argparse .ArgumentParser ()
146- parser .add_argument (
147- "-f" ,
148- "--file_name" ,
149- type = str ,
150- required = True ,
151- help = "The name of the tex file will full path" ,
152- )
153- args = parser .parse_args ()
154- file_name = args .file_name
155-
156- return file_name
157-
158-
159135def main () -> None :
160136 """
161137 The main function that executes the entire program.
@@ -181,7 +157,17 @@ def main() -> None:
181157 Returns:
182158 None
183159 """
184- file_name = parse_arguments ()
160+ parser = argparse .ArgumentParser ()
161+ parser .add_argument (
162+ "-f" ,
163+ "--file_name" ,
164+ type = str ,
165+ required = True ,
166+ help = "The name of the tex file will full path" ,
167+ )
168+ args = parser .parse_args ()
169+ file_name = args .file_name
170+
185171 process_one_file (file_name )
186172
187173
You can’t perform that action at this time.
0 commit comments