project refactor

This commit is contained in:
2024-08-25 18:34:45 +02:00
parent 52c677e242
commit 4cda2a2270
13 changed files with 51 additions and 43 deletions

12
main.py Normal file
View File

@@ -0,0 +1,12 @@
import src.task_splitter.code_processor as splitter
input_file = "source-code/tasks.c" # Replace this with your actual file name
output_dir = "build/"
functions = splitter.extract_functions_from_file(input_file)
print(f"Found {len(functions)} functions in the file.")
splitter.create_independent_files(functions, output_dir)
print("Functions have been split into separate files with their own main functions.")
splitter.save_functions_to_yaml(functions, output_dir + "functions.yaml")