From 01f6612ee2a8708235220f75ad721f6c95c480bf Mon Sep 17 00:00:00 2001 From: Clementine2722 <84880070+Clementine2722@users.noreply.github.com> Date: Sat, 2 Mar 2024 12:21:43 -0600 Subject: [PATCH] folder structure change code update --- frontend/main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/main.py b/frontend/main.py index 39c3b78..44526b1 100644 --- a/frontend/main.py +++ b/frontend/main.py @@ -25,8 +25,11 @@ def metadata_extractor_HTML(AST_file, HTML_file): return False -for filename in listdir("frontend/webpage"): - remove("frontend/webpage/" + filename) +for filename in listdir("docs"): + remove("docs/" + filename) + +with open(f'docs/CNAME', 'w') as file: + file.write("colab.agi-now.com") ### OPENING ALL SCENARIOS FILES @@ -203,7 +206,7 @@ def metadata_extractor_HTML(AST_file, HTML_file): scenario_name=output_scenarios_names[i] # This will be the title and header of the page ) - with open(f'frontend/webpage/{output_scenarios_names[i]}.html', 'w') as file: + with open(f'docs/{output_scenarios_names[i]}.html', 'w') as file: file.write(output) # Render the filled template # Now the menu.html @@ -217,5 +220,5 @@ def metadata_extractor_HTML(AST_file, HTML_file): template = environment.get_template("menu_template.html") output = template.render(scenarios=list_of_scenarios) -with open(f'frontend/webpage/menu.html', 'w') as file: +with open(f'docs/index.html', 'w') as file: file.write(output) # Render the filled template \ No newline at end of file