@@ -349,9 +349,11 @@ def generate_operators_doc(
349349 generate_toc_tree (output_path )
350350
351351
352- if __name__ == "__main__" :
353- parser = argparse .ArgumentParser (description = "Fetch available operators" )
354- parser .add_argument ("--plugin" , help = "Filter operators by plugin" )
352+ def run_with_args ():
353+ """Run generate_operators_doc from the command line with argument parsing."""
354+ parser = argparse .ArgumentParser (
355+ description = "Generate the operator documentation sources for operators of a given DPF installation."
356+ )
355357 parser .add_argument (
356358 "--ansys_path" , default = None , help = "Path to Ansys DPF Server installation directory"
357359 )
@@ -360,9 +362,10 @@ def generate_operators_doc(
360362 )
361363 parser .add_argument ("--include_private" , action = "store_true" , help = "Include private operators" )
362364 parser .add_argument (
363- "--include_composites" , action = "store_true" , help = "Include composites operators"
365+ "--include_composites" , action = "store_true" , help = "Include Composites operators"
364366 )
365- parser .add_argument ("--include_sound" , action = "store_true" , help = "Include sound operators" )
367+ parser .add_argument ("--include_sound" , action = "store_true" , help = "Include Sound operators" )
368+ parser .add_argument ("--plugin" , help = "Restrict to the given plugin." )
366369 args = parser .parse_args ()
367370
368371 generate_operators_doc (
@@ -371,4 +374,9 @@ def generate_operators_doc(
371374 include_composites = args .include_composites ,
372375 include_sound = args .include_sound ,
373376 include_private = args .include_private ,
377+ desired_plugin = args .plugin ,
374378 )
379+
380+
381+ if __name__ == "__main__" :
382+ run_with_args ()
0 commit comments